Method of coding transform coefficient based on high frequency zeroing and apparatus thereof

ABSTRACT

An image decoding method performed by a decoding apparatus according to the present disclosure includes receiving a bitstream including residual information; deriving quantized transform coefficients for a current block based on the residual information included in the bitstream; deriving residual samples for the current block based on the quantized transform coefficients; and generating a reconstructed picture based on the residual samples for the current block.

CROSS-REFERENCE TO RELATED APPLICATIONS

Pursuant to 35 U.S.C. § 119(e), this application is a continuation ofU.S. application Ser. No. 16/841,062 filed on Apr. 6, 2020, which is acontinuation of International Application PCT/KR2019/015330, with aninternational filing date of Nov. 12, 2019, which claims the benefit ofU.S. Provisional Application Nos. 62/760,033 filed on Nov. 12, 2018, and62/792,824 filed on Jan. 15, 2019, the contents of which are all herebyincorporated by reference herein in their entirety.

BACKGROUND OF THE DISCLOSURE Field of the Disclosure

The present disclosure relates to an image coding technique, and moreparticularly, to a method of coding a transform coefficient based onhigh frequency zeroing in an image coding system, and an apparatusthereof.

Related Art

Nowadays, the demand for high-resolution and high-quality images/videossuch as 4K, 8K or more ultra high definition (UHD) images/videos hasbeen increasing in various fields. As the image/video data becomeshigher resolution and higher quality, the transmitted information amountor bit amount increases as compared to the conventional image data.Therefore, when image data is transmitted using a medium such as aconventional wired/wireless broadband line or image/video data is storedusing an existing storage medium, the transmission cost and the storagecost thereof are increased.

Further, nowadays, the interest and demand for immersive media such asvirtual reality (VR), artificial reality (AR) content or hologram, orthe like is increasing, and broadcasting for images/videos having imagefeatures different from those of real images, such as a game image isincreasing.

Accordingly, there is a need for a highly efficient image/videocompression technique for effectively compressing and transmitting orstoring, and reproducing information of high resolution and high qualityimages/videos having various features as described above.

SUMMARY

A technical problem to be addressed by the present disclosure lies inproviding a method and an apparatus which increase image codingefficiency.

Another technical problem to be addressed by the present disclosure liesin providing a method and an apparatus which increase efficiency ofresidual coding.

Still another technical problem to be addressed by the presentdisclosure lies in providing a method and an apparatus which increaseefficiency of transform coefficient level coding.

Still another technical problem to be addressed by the presentdisclosure lies in providing a method and an apparatus which increaseresidual coding efficiency by coding a transform coefficient based onhigh frequency zeroing.

Still another problem to be addressed by the present disclosure lies inproviding a method and an apparatus which code position information of alast significant coefficient in a current block (or current transformblock) based on high frequency zeroing.

Still another technical problem to be addressed by the presentdisclosure lies in providing a method and an apparatus which derive amaximum length of a codeword representing a last significant transformcoefficient based on a size of a region in the current block, to whichhigh frequency zeroing is not applied when transform coefficients forthe current block (or current transform block) are coded based on thehigh frequency zeroing.

Still another technical problem to be addressed by the presentdisclosure lies in providing a method and an apparatus which binarizelast significant coefficient prefix information and last significantcoefficient suffix information when high frequency zeroing is performed.

According to an example of the present disclosure, there is provided animage decoding method which is performed by a decoding apparatus. Themethod includes receiving a bitstream including residual information;deriving quantized transform coefficients for a current block based onthe residual information included in the bitstream; deriving transformcoefficients for the current block from the quantized transformcoefficients based on an inverse quantization process; deriving residualsamples for the current block by applying inverse transform to thederived transform coefficients; and generating a reconstructed picturebased on the residual samples for the current block, wherein each of thetransform coefficients for the current block is related to a highfrequency transform coefficient region consisting of transformcoefficient 0, or a low frequency transform coefficient region includingat least one significant transform coefficient, the residual informationincludes last significant coefficient prefix information and lastsignificant coefficient suffix information on position of last non-zerotransform coefficient among the transform coefficients for the currentblock, the position of the last non-zero transform coefficient isdetermined based on prefix codeword, which represents the lastsignificant coefficient prefix information, and the last significantcoefficient suffix information, and a maximum length of the prefixcodeword is determined based on a size of the low frequency transformcoefficient region.

According to another example of the present disclosure, there isprovided a decoding apparatus for performing image decoding. Thedecoding apparatus includes an entropy decoder which receives abitstream including residual information, and derives quantizedtransform coefficients for a current block based on the residualinformation included in the bitstream; a dequantizer which derivestransform coefficients for the current block from the quantizedtransform coefficients based on an inverse quantization process; aninverse transformer which derives residual samples for the current blockby applying inverse transform to the derived transform coefficients; andan adder which generates a reconstructed picture based on the residualsamples for the current block, wherein each of the transformcoefficients for the current block is related to a high frequencytransform coefficient region consisting of transform coefficient 0, or alow frequency transform coefficient region including at least onesignificant transform coefficient, the residual information includeslast significant coefficient prefix information and last significantcoefficient suffix information on position of a last non-zero transformcoefficient among the transform coefficients for the current block, theposition of the last non-zero transform coefficient is determined basedon prefix codeword, which represents the last significant coefficientprefix information, and the last significant coefficient suffixinformation, and a maximum length of the prefix codeword is determinedbased on a size of the low frequency transform coefficient region.

According to still another example of the disclosure, there is providedan image encoding method which is performed by an encoding apparatus.The method includes deriving residual samples for a current block;deriving transform coefficients for the current block by transformingthe residual samples for the current block; deriving quantized transformcoefficients from the transform coefficients based on a quantizationprocess; and encoding residual information including information on thequantized transform coefficients, wherein each of the transformcoefficients for the current block is related to a high frequencytransform coefficient region consisting of transform coefficient 0, or alow frequency transform coefficient region including at least onesignificant transform coefficient, the residual information includeslast significant coefficient prefix information and last significantcoefficient suffix information on position of a last non-zero transformcoefficient among the transform coefficients for the current block, theposition of the last non-zero transform coefficient is based on prefixcodeword, which represents the last significant coefficient prefixinformation, and the last significant coefficient suffix information,and a maximum length of the prefix codeword is determined based on asize of the low frequency transform coefficient region.

According to still another example of the present disclosure, there isprovided an encoding apparatus for performing image encoding. Theencoding apparatus includes a subtractor which derives residual samplesfor a current block; a transformer which derives transform coefficientsfor the current block by transforming the residual samples for thecurrent block; a quantizer which derives quantized transformcoefficients from the transform coefficients based on a quantizationprocess; and an entropy encoder which encodes residual informationincluding information on the quantized transform coefficients, whereineach of the transform coefficients for the current block is related to ahigh frequency transform coefficient region consisting of transformcoefficient 0, or a low frequency transform coefficient region includingat least one significant transform coefficient, the residual informationincludes last significant coefficient prefix information and lastsignificant coefficient suffix information on position of a lastnon-zero transform coefficient among the transform coefficients for thecurrent block, the position of the last non-zero transform coefficientis based on prefix codeword, which represents the last significantcoefficient prefix information, and the last significant coefficientsuffix information, and a maximum length of the prefix codeword isdetermined based on a size of the low frequency transform coefficientregion.

According to still another example of the present disclosure, there isprovided a decoder-readable storage medium which stores information oninstructions which cause a video decoding apparatus to perform decodingmethods according to some examples.

According to still another example of the present disclosure, there isprovided a decoder-readable storage medium which stores information oninstructions which cause a video decoding apparatus to perform adecoding method according to an example. The decoding method accordingto the example includes receiving a bitstream including residualinformation; deriving quantized transform coefficients for a currentblock based on the residual information included in the bitstream;deriving transform coefficients for the current block from the quantizedtransform coefficients based on an inverse quantization process;deriving residual samples for the current block by applying inversetransform to the derived transform coefficients; and generating areconstructed picture based on the residual samples for the currentblock, wherein each of the transform coefficients for the current blockis related to a high frequency transform coefficient region consistingof transform coefficient 0, or a low frequency transform coefficientregion including at least one significant transform coefficient, theresidual information includes last significant coefficient prefixinformation and last significant coefficient suffix information onposition of last non-zero transform coefficient among the transformcoefficients for the current block, the position of the last non-zerotransform coefficient is determined based on prefix codeword, whichrepresents the last significant coefficient prefix information, and thelast significant coefficient suffix information, and a maximum length ofthe prefix codeword is determined based on a size of the low frequencytransform coefficient region.

According to the present disclosure, it is possible to increase generalimage/video compression efficiency.

According to the present disclosure, it is possible to increase theefficiency of residual coding.

According to the present disclosure, it is possible to increase theefficiency of transform coefficient level coding.

According to the present disclosure, it is possible to increase residualcoding efficiency by coding a transform coefficient based on highfrequency zeroing (or, high frequency zero-out).

According to the present disclosure, it is possible to increase imagecoding efficiency by coding position information of a last significanttransform coefficient in a current block (or current transform block)based on high frequency zeroing.

According to the present disclosure, it is possible to increase imagecoding efficiency by deriving a maximum length of a codewordrepresenting a last significant transform coefficient based on a size ofa region in the current block, to which high frequency zeroing is notapplied when transform coefficients for the current block (or currenttransform block) are coded based on the high frequency zeroing.

According to the present disclosure, when the high frequency zeroing isapplied, by performing binarization on a syntax element based on thesize of a low frequency zeroing region (or, region to which the highfrequency zeroing is not applied), it is possible to perform coding moreefficiently, and improve the throughput of CABAC by reducing the numberof context-coded bins.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 schematically represents an example of a video/image codingsystem to which the present disclosure may be applied.

FIG. 2 is a diagram schematically describing a configuration of avideo/image encoding apparatus to which the present disclosure may beapplied.

FIG. 3 is a diagram schematically describing a configuration of avideo/image decoding apparatus to which the present disclosure may beapplied.

FIGS. 4A and 4B are a drawing for explaining the configuration andoperation of the entropy encoder according to an example.

FIGS. 5A and 5B are a drawing for explaining the configuration andoperation method of an entropy decoder according to an example.

FIG. 6 is a drawing for explaining high frequency zeroing according toan example.

FIG. 7 is a flowchart showing operation of an encoding apparatusaccording to an example.

FIG. 8 is a block diagram showing a configuration of an encodingapparatus according to an example.

FIG. 9 is a flowchart showing operation of a decoding apparatusaccording to an example.

FIG. 10 is a block diagram showing a configuration of a decodingapparatus according to an example.

FIG. 11 represents an example of a contents streaming system to whichthe disclosure of the present document may be applied.

DESCRIPTION OF EXEMPLARY EMBODIMENTS

According to an example of the present disclosure, there is provided animage decoding method which is performed by a decoding apparatus. Themethod includes receiving a bitstream including residual information;deriving quantized transform coefficients for a current block based onthe residual information included in the bitstream; deriving transformcoefficients for the current block from the quantized transformcoefficients based on an inverse quantization process; deriving residualsamples for the current block by applying inverse transform to thederived transform coefficients; and generating a reconstructed picturebased on the residual samples for the current block, wherein each of thetransform coefficients for the current block is related to a highfrequency transform coefficient region consisting of transformcoefficient 0, or a low frequency transform coefficient region includingat least one significant transform coefficient, the residual informationincludes last significant coefficient prefix information and lastsignificant coefficient suffix information on position of last non-zerotransform coefficient among the transform coefficients for the currentblock, the position of the last non-zero transform coefficient isdetermined based on prefix codeword, which represents the lastsignificant coefficient prefix information, and the last significantcoefficient suffix information, and a maximum length of the prefixcodeword is determined based on a size of the low frequency transformcoefficient region.

While the present disclosure may be susceptible to various modificationsand include various embodiments, specific embodiments thereof have beenshown in the drawings by way of example and will now be described indetail. However, this is not intended to limit the present disclosure tothe specific embodiments disclosed herein. The terminology used hereinis for the purpose of describing specific embodiments only, and is notintended to limit technical idea of the present disclosure. The singularforms may include the plural forms unless the context clearly indicatesotherwise. The terms such as “comprise”, “include”, and the like areintended to indicate that features, numbers, steps, operations,elements, components, or combinations thereof used in the followingdescription exist, and thus should not be understood as that thepossibility of existence or addition of one or more different features,numbers, steps, operations, elements, components, or combinationsthereof is excluded in advance.

Meanwhile, each component on the drawings described herein isillustrated independently for convenience of description as tocharacteristic functions different from each other, and however, it isnot meant that each component is embodied by a separate hardware orsoftware. For example, any two or more of these components may becombined to form a single component, and any single component may bedivided into plural components. The embodiments in which components arecombined and/or divided will fall into the scope of the patent right ofthe present disclosure as long as they do not depart from the essence ofthe present disclosure.

Hereinafter, preferred embodiments of the present disclosure will beexplained in more detail while referring to the attached drawings.Hereinafter, the same reference signs are used for the same componentson the drawings, and repeated descriptions for the same components maybe omitted.

FIG. 1 schematically represents an example of a video/image codingsystem to which the present disclosure may be applied.

This document relates to video/image coding. For example, themethods/embodiments disclosed in this document may be applied to amethod disclosed in the versatile video coding (VVC), the EVC (essentialvideo coding) standard, the AOMedia Video 1 (AV1) standard, the 2ndgeneration of audio video coding standard (AVS2), or the next generationvideo/image coding standard (ex. H.267 or H.268, etc.).

This document presents various embodiments of video/image coding, andthe embodiments may be performed in combination with each other unlessotherwise mentioned.

In this document, video may refer to a series of images over time.Picture generally refers to a unit representing one image in a specifictime zone, and a slice/tile is a unit constituting part of a picture incoding. The slice/tile may include one or more coding tree units (CTUs).One picture may consist of one or more slices/tiles. One picture mayconsist of one or more tile groups. One tile group may include one ormore tiles. A brick may represent a rectangular region of CTU rowswithin a tile in a picture. A tile may be partitioned into multiplebricks, each of which consisting of one or more CTU rows within thetile. A tile that is not partitioned into multiple bricks may be alsoreferred to as a brick. A brick scan is a specific sequential orderingof CTUs partitioning a picture in which the CTUs are orderedconsecutively in CTU raster scan in a brick, bricks within a tile areordered consecutively in a raster scan of the bricks of the tile, andtiles in a picture are ordered consecutively in a raster scan of thetiles of the picture. A tile is a rectangular region of CTUs within aparticular tile column and a particular tile row in a picture. The tilecolumn is a rectangular region of CTUs having a height equal to theheight of the picture and a width specified by syntax elements in thepicture parameter set. The tile row is a rectangular region of CTUshaving a height specified by syntax elements in the picture parameterset and a width equal to the width of the picture. A tile scan is aspecific sequential ordering of CTUs partitioning a picture in which theCTUs are ordered consecutively in CTU raster scan in a tile whereastiles in a picture are ordered consecutively in a raster scan of thetiles of the picture. A slice includes an integer number of bricks of apicture that may be exclusively contained in a single NAL unit. A slicemay consists of either a number of complete tiles or only a consecutivesequence of complete bricks of one tile. Tile groups and slices may beused interchangeably in this document. For example, in this document, atile group/tile group header may be called a slice/slice header.

A pixel or a pel may mean a smallest unit constituting one picture (orimage). Also, ‘sample’ may be used as a term corresponding to a pixel. Asample may generally represent a pixel or a value of a pixel, and mayrepresent only a pixel/pixel value of a luma component or only apixel/pixel value of a chroma component.

A unit may represent a basic unit of image processing. The unit mayinclude at least one of a specific region of the picture and informationrelated to the region. One unit may include one luma block and twochroma (ex. cb, cr) blocks. The unit may be used interchangeably withterms such as block or area in some cases. In a general case, an M×Nblock may include samples (or sample arrays) or a set (or array) oftransform coefficients of M columns and N rows.

In this document, the term “/” and “,” should be interpreted to indicate“and/or.” For instance, the expression “A/B” may mean “A and/or B.”Further, “A, B” may mean “A and/or B.” Further, “A/B/C” may mean “atleast one of A, B, and/or C.” Also, “A/B/C” may mean “at least one of A,B, and/or C.”

Further, in the document, the term “or” should be interpreted toindicate “and/or.” For instance, the expression “A or B” may comprise 1)only A, 2) only B, and/or 3) both A and B. In other words, the term “or”in this document should be interpreted to indicate “additionally oralternatively.”

Referring to FIG. 1, a video/image coding system may include a firstdevice (source device) and a second device (receiving device). Thesource device may deliver encoded video/image information or data in theform of a file or streaming to the receiving device via a digitalstorage medium or network.

The source device may include a video source, an encoding apparatus, anda transmitter. The receiving device may include a receiver, a decodingapparatus, and a renderer. The encoding apparatus may be called avideo/image encoding apparatus, and the decoding apparatus may be calleda video/image decoding apparatus. The transmitter may be included in theencoding apparatus. The receiver may be included in the decodingapparatus. The renderer may include a display, and the display may beconfigured as a separate device or an external component.

The video source may acquire video/image through a process of capturing,synthesizing, or generating the video/image. The video source mayinclude a video/image capture device and/or a video/image generatingdevice. The video/image capture device may include, for example, one ormore cameras, video/image archives including previously capturedvideo/images, and the like. The video/image generating device mayinclude, for example, computers, tablets and smartphones, and may(electronically) generate video/images. For example, a virtualvideo/image may be generated through a computer or the like. In thiscase, the video/image capturing process may be replaced by a process ofgenerating related data.

The encoding apparatus may encode input video/image. The encodingapparatus may perform a series of procedures such as prediction,transform, and quantization for compression and coding efficiency. Theencoded data (encoded video/image information) may be output in the formof a bitstream.

The transmitter may transmit the encoded image/image information or dataoutput in the form of a bitstream to the receiver of the receivingdevice through a digital storage medium or a network in the form of afile or streaming. The digital storage medium may include variousstorage mediums such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, and thelike. The transmitter may include an element for generating a media filethrough a predetermined file format and may include an element fortransmission through a broadcast/communication network. The receiver mayreceive/extract the bitstream and transmit the received bitstream to thedecoding apparatus.

The decoding apparatus may decode the video/image by performing a seriesof procedures such as dequantization, inverse transform, and predictioncorresponding to the operation of the encoding apparatus.

The renderer may render the decoded video/image. The renderedvideo/image may be displayed through the display.

FIG. 2 is a diagram schematically describing a configuration of avideo/image encoding apparatus to which the present disclosure may beapplied. Hereinafter, what is referred to as the video encodingapparatus may include an image encoding apparatus.

Referring to FIG. 2, the encoding apparatus 200 includes an imagepartitioner 210, a predictor 220, a residual processor 230, and anentropy encoder 240, an adder 250, a filter 260, and a memory 270. Thepredictor 220 may include an inter predictor 221 and an intra predictor222. The residual processor 230 may include a transformer 232, aquantizer 233, a dequantizer 234, and an inverse transformer 235. Theresidual processor 230 may further include a subtractor 231. The adder250 may be called a reconstructor or a reconstructed block generator.The image partitioner 210, the predictor 220, the residual processor230, the entropy encoder 240, the adder 250, and the filter 260 may beconfigured by at least one hardware component (ex. an encoder chipset orprocessor) according to an embodiment. In addition, the memory 270 mayinclude a decoded picture buffer (DPB) or may be configured by a digitalstorage medium. The hardware component may further include the memory270 as an internal/external component.

The image partitioner 210 may partition an input image (or a picture ora frame) input to the encoding apparatus 200 into one or moreprocessors. For example, the processor may be called a coding unit (CU).In this case, the coding unit may be recursively partitioned accordingto a quad-tree binary-tree ternary-tree (QTBTTT) structure from a codingtree unit (CTU) or a largest coding unit (LCU). For example, one codingunit may be partitioned into a plurality of coding units of a deeperdepth based on a quad tree structure, a binary tree structure, and/or aternary structure. In this case, for example, the quad tree structuremay be applied first and the binary tree structure and/or ternarystructure may be applied later. Alternatively, the binary tree structuremay be applied first. The coding procedure according to this documentmay be performed based on the final coding unit that is no longerpartitioned. In this case, the largest coding unit may be used as thefinal coding unit based on coding efficiency according to imagecharacteristics, or if necessary, the coding unit may be recursivelypartitioned into coding units of deeper depth and a coding unit havingan optimal size may be used as the final coding unit. Here, the codingprocedure may include a procedure of prediction, transform, andreconstruction, which will be described later. As another example, theprocessor may further include a prediction unit (PU) or a transform unit(TU). In this case, the prediction unit and the transform unit may besplit or partitioned from the aforementioned final coding unit. Theprediction unit may be a unit of sample prediction, and the transformunit may be a unit for deriving a transform coefficient and/or a unitfor deriving a residual signal from the transform coefficient.

The unit may be used interchangeably with terms such as block or area insome cases. In a general case, an M×N block may represent a set ofsamples or transform coefficients composed of M columns and N rows. Asample may generally represent a pixel or a value of a pixel, mayrepresent only a pixel/pixel value of a luma component or represent onlya pixel/pixel value of a chroma component. A sample may be used as aterm corresponding to one picture (or image) for a pixel or a pel.

In the encoding apparatus 200, a prediction signal (predicted block,prediction sample array) output from the inter predictor 221 or theintra predictor 222 is subtracted from an input image signal (originalblock, original sample array) to generate a residual signal residualblock, residual sample array), and the generated residual signal istransmitted to the transformer 232. In this case, as shown, a unit forsubtracting a prediction signal (predicted block, prediction samplearray) from the input image signal (original block, original samplearray) in the encoder 200 may be called a subtractor 231. The predictormay perform prediction on a block to be processed (hereinafter, referredto as a current block) and generate a predicted block includingprediction samples for the current block. The predictor may determinewhether intra prediction or inter prediction is applied on a currentblock or CU basis. As described later in the description of eachprediction mode, the predictor may generate various information relatedto prediction, such as prediction mode information, and transmit thegenerated information to the entropy encoder 240. The information on theprediction may be encoded in the entropy encoder 240 and output in theform of a bitstream.

The intra predictor 222 may predict the current block by referring tothe samples in the current picture. The referred samples may be locatedin the neighborhood of the current block or may be located apartaccording to the prediction mode. In the intra prediction, predictionmodes may include a plurality of non-directional modes and a pluralityof directional modes. The non-directional mode may include, for example,a DC mode and a planar mode. The directional mode may include, forexample, 33 directional prediction modes or 65 directional predictionmodes according to the degree of detail of the prediction direction.However, this is merely an example, more or less directional predictionmodes may be used depending on a setting. The intra predictor 222 maydetermine the prediction mode applied to the current block by using aprediction mode applied to a neighboring block.

The inter predictor 221 may derive a predicted block for the currentblock based on a reference block (reference sample array) specified by amotion vector on a reference picture. Here, in order to reduce theamount of motion information transmitted in the inter prediction mode,the motion information may be predicted in units of blocks, subblocks,or samples based on correlation of motion information between theneighboring block and the current block. The motion information mayinclude a motion vector and a reference picture index. The motioninformation may further include inter prediction direction (L0prediction, L1 prediction, Bi prediction, etc.) information. In the caseof inter prediction, the neighboring block may include a spatialneighboring block present in the current picture and a temporalneighboring block present in the reference picture. The referencepicture including the reference block and the reference pictureincluding the temporal neighboring block may be the same or different.The temporal neighboring block may be called a collocated referenceblock, a co-located CU (colCU), and the like, and the reference pictureincluding the temporal neighboring block may be called a collocatedpicture (colPic). For example, the inter predictor 221 may configure amotion information candidate list based on neighboring blocks andgenerate information indicating which candidate is used to derive amotion vector and/or a reference picture index of the current block.Inter prediction may be performed based on various prediction modes. Forexample, in the case of a skip mode and a merge mode, the interpredictor 221 may use motion information of the neighboring block asmotion information of the current block. In the skip mode, unlike themerge mode, the residual signal may not be transmitted. In the case ofthe motion vector prediction (MVP) mode, the motion vector of theneighboring block may be used as a motion vector predictor and themotion vector of the current block may be indicated by signaling amotion vector difference.

The predictor 220 may generate a prediction signal based on variousprediction methods described below. For example, the predictor may notonly apply intra prediction or inter prediction to predict one block butalso simultaneously apply both intra prediction and inter prediction.This may be called combined inter and intra prediction (CIIP). Inaddition, the predictor may be based on an intra block copy (IBC)prediction mode or a palette mode for prediction of a block. The IBCprediction mode or palette mode may be used for content image/videocoding of a game or the like, for example, screen content coding (SCC).The IBC basically performs prediction in the current picture but may beperformed similarly to inter prediction in that a reference block isderived in the current picture. That is, the IBC may use at least one ofthe inter prediction techniques described in this document. The palettemode may be considered as an example of intra coding or intraprediction. When the palette mode is applied, a sample value within apicture may be signaled based on information on the palette table andthe palette index.

The prediction signal generated by the predictor (including the interpredictor 221 and/or the intra predictor 222) may be used to generate areconstructed signal or to generate a residual signal. The transformer232 may generate transform coefficients by applying a transformtechnique to the residual signal. For example, the transform techniquemay include at least one of a discrete cosine transform (DCT), adiscrete sine transform (DST), a karhunen-loeve transform (KLT), agraph-based transform (GBT), or a conditionally non-linear transform(CNT). Here, the GBT means transform obtained from a graph whenrelationship information between pixels is represented by the graph. TheCNT refers to transform generated based on a prediction signal generatedusing all previously reconstructed pixels. In addition, the transformprocess may be applied to square pixel blocks having the same size ormay be applied to blocks having a variable size rather than square.

The quantizer 233 may quantize the transform coefficients and transmitthem to the entropy encoder 240 and the entropy encoder 240 may encodethe quantized signal (information on the quantized transformcoefficients) and output a bitstream. The information on the quantizedtransform coefficients may be referred to as residual information. Thequantizer 233 may rearrange block type quantized transform coefficientsinto a one-dimensional vector form based on a coefficient scanning orderand generate information on the quantized transform coefficients basedon the quantized transform coefficients in the one-dimensional vectorform. Information on transform coefficients may be generated. Theentropy encoder 240 may perform various encoding methods such as, forexample, exponential Golomb, context-adaptive variable length coding(CAVLC), context-adaptive binary arithmetic coding (CABAC), and thelike. The entropy encoder 240 may encode information necessary forvideo/image reconstruction other than quantized transform coefficients(ex. values of syntax elements, etc.) together or separately. Encodedinformation (ex. encoded video/image information) may be transmitted orstored in units of NALs (network abstraction layer) in the form of abitstream. The video/image information may further include informationon various parameter sets such as an adaptation parameter set (APS), apicture parameter set (PPS), a sequence parameter set (SPS), or a videoparameter set (VPS). In addition, the video/image information mayfurther include general constraint information. In this document,information and/or syntax elements transmitted/signaled from theencoding apparatus to the decoding apparatus may be included invideo/picture information. The video/image information may be encodedthrough the above-described encoding procedure and included in thebitstream. The bitstream may be transmitted over a network or may bestored in a digital storage medium. The network may include abroadcasting network and/or a communication network, and the digitalstorage medium may include various storage media such as USB, SD, CD,DVD, Blu-ray, HDD, SSD, and the like. A transmitter (not shown)transmitting a signal output from the entropy encoder 240 and/or astorage unit (not shown) storing the signal may be included asinternal/external element of the encoding apparatus 200, andalternatively, the transmitter may be included in the entropy encoder240.

The quantized transform coefficients output from the quantizer 233 maybe used to generate a prediction signal. For example, the residualsignal (residual block or residual samples) may be reconstructed byapplying dequantization and inverse transform to the quantized transformcoefficients through the dequantizer 234 and the inverse transformer235. The adder 250 adds the reconstructed residual signal to theprediction signal output from the inter predictor 221 or the intrapredictor 222 to generate a reconstructed signal (reconstructed picture,reconstructed block, reconstructed sample array). If there is noresidual for the block to be processed, such as a case where the skipmode is applied, the predicted block may be used as the reconstructedblock. The adder 250 may be called a reconstructor or a reconstructedblock generator. The generated reconstructed signal may be used forintra prediction of a next block to be processed in the current pictureand may be used for inter prediction of a next picture through filteringas described below.

Meanwhile, luma mapping with chroma scaling (LMCS) may be applied duringpicture encoding and/or reconstruction.

The filter 260 may improve subjective/objective image quality byapplying filtering to the reconstructed signal. For example, the filter260 may generate a modified reconstructed picture by applying variousfiltering methods to the reconstructed picture and store the modifiedreconstructed picture in the memory 270, specifically, a DPB of thememory 270. The various filtering methods may include, for example,deblocking filtering, a sample adaptive offset, an adaptive loop filter,a bilateral filter, and the like. The filter 260 may generate variousinformation related to the filtering and transmit the generatedinformation to the entropy encoder 240 as described later in thedescription of each filtering method. The information related to thefiltering may be encoded by the entropy encoder 240 and output in theform of a bitstream.

The modified reconstructed picture transmitted to the memory 270 may beused as the reference picture in the inter predictor 221. When the interprediction is applied through the encoding apparatus, predictionmismatch between the encoding apparatus 200 and the decoding apparatusmay be avoided and encoding efficiency may be improved.

The DPB of the memory 270 DPB may store the modified reconstructedpicture for use as a reference picture in the inter predictor 221. Thememory 270 may store the motion information of the block from which themotion information in the current picture is derived (or encoded) and/orthe motion information of the blocks in the picture that have alreadybeen reconstructed. The stored motion information may be transmitted tothe inter predictor 221 and used as the motion information of thespatial neighboring block or the motion information of the temporalneighboring block. The memory 270 may store reconstructed samples ofreconstructed blocks in the current picture and may transfer thereconstructed samples to the intra predictor 222.

FIG. 3 is a schematic diagram illustrating a configuration of avideo/image decoding apparatus to which the embodiment(s) of the presentdocument may be applied.

Referring to FIG. 3, the decoding apparatus 300 may include an entropydecoder 310, a residual processor 320, a predictor 330, an adder 340, afilter 350, a memory 360. The predictor 330 may include an interpredictor 331 and an intra predictor 332. The residual processor 320 mayinclude a dequantizer 321 and an inverse transformer 321. The entropydecoder 310, the residual processor 320, the predictor 330, the adder340, and the filter 350 may be configured by a hardware component (ex. adecoder chipset or a processor) according to an embodiment. In addition,the memory 360 may include a decoded picture buffer (DPB) or may beconfigured by a digital storage medium. The hardware component mayfurther include the memory 360 as an internal/external component.

When a bitstream including video/image information is input, thedecoding apparatus 300 may reconstruct an image corresponding to aprocess in which the video/image information is processed in theencoding apparatus of FIG. 2. For example, the decoding apparatus 300may derive units/blocks based on block partition related informationobtained from the bitstream. The decoding apparatus 300 may performdecoding using a processor applied in the encoding apparatus. Thus, theprocessor of decoding may be a coding unit, for example, and the codingunit may be partitioned according to a quad tree structure, binary treestructure and/or ternary tree structure from the coding tree unit or thelargest coding unit. One or more transform units may be derived from thecoding unit. The reconstructed image signal decoded and output throughthe decoding apparatus 300 may be reproduced through a reproducingapparatus.

The decoding apparatus 300 may receive a signal output from the encodingapparatus of FIG. 2 in the form of a bitstream, and the received signalmay be decoded through the entropy decoder 310. For example, the entropydecoder 310 may parse the bitstream to derive information (ex.video/image information) necessary for image reconstruction (or picturereconstruction). The video/image information may further includeinformation on various parameter sets such as an adaptation parameterset (APS), a picture parameter set (PPS), a sequence parameter set(SPS), or a video parameter set (VPS). In addition, the video/imageinformation may further include general constraint information. Thedecoding apparatus may further decode picture based on the informationon the parameter set and/or the general constraint information.Signaled/received information and/or syntax elements described later inthis document may be decoded may decode the decoding procedure andobtained from the bitstream. For example, the entropy decoder 310decodes the information in the bitstream based on a coding method suchas exponential Golomb coding, CAVLC, or CABAC, and output syntaxelements required for image reconstruction and quantized values oftransform coefficients for residual. More specifically, the CABACentropy decoding method may receive a bin corresponding to each syntaxelement in the bitstream, determine a context model using a decodingtarget syntax element information, decoding information of a decodingtarget block or information of a symbol/bin decoded in a previous stage,and perform an arithmetic decoding on the bin by predicting aprobability of occurrence of a bin according to the determined contextmodel, and generate a symbol corresponding to the value of each syntaxelement. In this case, the CABAC entropy decoding method may update thecontext model by using the information of the decoded symbol/bin for acontext model of a next symbol/bin after determining the context model.The information related to the prediction among the information decodedby the entropy decoder 310 may be provided to the predictor (the interpredictor 332 and the intra predictor 331), and the residual value onwhich the entropy decoding was performed in the entropy decoder 310,that is, the quantized transform coefficients and related parameterinformation, may be input to the residual processor 320. The residualprocessor 320 may derive the residual signal (the residual block, theresidual samples, the residual sample array). In addition, informationon filtering among information decoded by the entropy decoder 310 may beprovided to the filter 350. Meanwhile, a receiver (not shown) forreceiving a signal output from the encoding apparatus may be furtherconfigured as an internal/external element of the decoding apparatus300, or the receiver may be a component of the entropy decoder 310.Meanwhile, the decoding apparatus according to this document may bereferred to as a video/image/picture decoding apparatus, and thedecoding apparatus may be classified into an information decoder(video/image/picture information decoder) and a sample decoder(video/image/picture sample decoder). The information decoder mayinclude the entropy decoder 310, and the sample decoder may include atleast one of the dequantizer 321, the inverse transformer 322, the adder340, the filter 350, the memory 360, the inter predictor 332, and theintra predictor 331.

The dequantizer 321 may dequantize the quantized transform coefficientsand output the transform coefficients. The dequantizer 321 may rearrangethe quantized transform coefficients in the form of a two-dimensionalblock form. In this case, the rearrangement may be performed based onthe coefficient scanning order performed in the encoding apparatus. Thedequantizer 321 may perform dequantization on the quantized transformcoefficients by using a quantization parameter (ex. quantization stepsize information) and obtain transform coefficients.

The inverse transformer 322 inversely transforms the transformcoefficients to obtain a residual signal (residual block, residualsample array).

The predictor may perform prediction on the current block and generate apredicted block including prediction samples for the current block. Thepredictor may determine whether intra prediction or inter prediction isapplied to the current block based on the information on the predictionoutput from the entropy decoder 310 and may determine a specificintra/inter prediction mode.

The predictor 320 may generate a prediction signal based on variousprediction methods described below. For example, the predictor may notonly apply intra prediction or inter prediction to predict one block butalso simultaneously apply intra prediction and inter prediction. Thismay be called combined inter and intra prediction (CIIP). In addition,the predictor may be based on an intra block copy (IBC) prediction modeor a palette mode for prediction of a block. The IBC prediction mode orpalette mode may be used for content image/video coding of a game or thelike, for example, screen content coding (SCC). The IBC basicallyperforms prediction in the current picture but may be performedsimilarly to inter prediction in that a reference block is derived inthe current picture. That is, the IBC may use at least one of the interprediction techniques described in this document. The palette mode maybe considered as an example of intra coding or intra prediction. Whenthe palette mode is applied, a sample value within a picture may besignaled based on information on the palette table and the paletteindex.

The intra predictor 331 may predict the current block by referring tothe samples in the current picture. The referred samples may be locatedin the neighborhood of the current block or may be located apartaccording to the prediction mode. In the intra prediction, predictionmodes may include a plurality of non-directional modes and a pluralityof directional modes. The intra predictor 331 may determine theprediction mode applied to the current block by using a prediction modeapplied to a neighboring block.

The inter predictor 332 may derive a predicted block for the currentblock based on a reference block (reference sample array) specified by amotion vector on a reference picture. In this case, in order to reducethe amount of motion information transmitted in the inter predictionmode, motion information may be predicted in units of blocks, subblocks,or samples based on correlation of motion information between theneighboring block and the current block. The motion information mayinclude a motion vector and a reference picture index. The motioninformation may further include inter prediction direction (L0prediction, L1 prediction, Bi prediction, etc.) information. In the caseof inter prediction, the neighboring block may include a spatialneighboring block present in the current picture and a temporalneighboring block present in the reference picture. For example, theinter predictor 332 may configure a motion information candidate listbased on neighboring blocks and derive a motion vector of the currentblock and/or a reference picture index based on the received candidateselection information. Inter prediction may be performed based onvarious prediction modes, and the information on the prediction mayinclude information indicating a mode of inter prediction for thecurrent block.

The adder 340 may generate a reconstructed signal (reconstructedpicture, reconstructed block, reconstructed sample array) by adding theobtained residual signal to the prediction signal (predicted block,predicted sample array) output from the predictor (including the interpredictor 332 and/or the intra predictor 331). If there is no residualfor the block to be processed, such as when the skip mode is applied,the predicted block may be used as the reconstructed block.

The adder 340 may be called reconstructor or a reconstructed blockgenerator. The generated reconstructed signal may be used for intraprediction of a next block to be processed in the current picture, maybe output through filtering as described below, or may be used for interprediction of a next picture.

Meanwhile, luma mapping with chroma scaling (LMCS) may be applied in thepicture decoding process.

The filter 350 may improve subjective/objective image quality byapplying filtering to the reconstructed signal. For example, the filter350 may generate a modified reconstructed picture by applying variousfiltering methods to the reconstructed picture and store the modifiedreconstructed picture in the memory 360, specifically, a DPB of thememory 360. The various filtering methods may include, for example,deblocking filtering, a sample adaptive offset, an adaptive loop filter,a bilateral filter, and the like.

The (modified) reconstructed picture stored in the DPB of the memory 360may be used as a reference picture in the inter predictor 332. Thememory 360 may store the motion information of the block from which themotion information in the current picture is derived (or decoded) and/orthe motion information of the blocks in the picture that have alreadybeen reconstructed. The stored motion information may be transmitted tothe inter predictor 260 so as to be utilized as the motion informationof the spatial neighboring block or the motion information of thetemporal neighboring block. The memory 360 may store reconstructedsamples of reconstructed blocks in the current picture and transfer thereconstructed samples to the intra predictor 331.

In the present disclosure, the embodiments described in the filter 260,the inter predictor 221, and the intra predictor 222 of the encodingapparatus 200 may be the same as or respectively applied to correspondto the filter 350, the inter predictor 332, and the intra predictor 331of the decoding apparatus 300. The same may also apply to the unit 332and the intra predictor 331.

As described above, prediction is performed in order to increasecompression efficiency in performing video coding. Through this, apredicted block including prediction samples for a current block, whichis a coding target block, may be generated. Here, the predicted blockincludes prediction samples in a space domain (or pixel domain). Thepredicted block may be indentically derived in the encoding apparatusand the decoding apparatus, and the encoding apparatus may increaseimage coding efficiency by signaling to the decoding apparatus notoriginal sample value of an original block itself but information onresidual (residual information) between the original block and thepredicted block. The decoding apparatus may derive a residual blockincluding residual samples based on the residual information, generate areconstructed block including reconstruction samples by adding theresidual block to the predicted block, and generate a reconstructedpicture including reconstructed blocks.

The residual information may be generated through transform andquantization procedures. For example, the encoding apparatus may derivea residual block between the original block and the predicted block,derive transform coefficients by performing a transform procedure onresidual samples (residual sample array) included in the residual block,and derive quantized transform coefficients by performing a quantizationprocedure on the transform coefficients, so that it may signalassociated residual information to the decoding apparatus (through abitstream). Here, the residual information may include valueinformation, position information, a transform technique, transformkernel, a quantization parameter or the like of the quantized transformcoefficients. The decoding apparatus may perform aquantization/dequantization procedure and derive the residual samples(or residual sample block), based on residual information. The decodingapparatus may generate a reconstructed block based on a predicted blockand the residual block. The encoding apparatus may derive a residualblock by dequantizing/inverse transforming quantized transformcoefficients for reference for inter prediction of a next picture, andmay generate a reconstructed picture based on this.

FIGS. 4A and 4B are a drawing for explaining the configuration andoperation of the entropy encoder according to an embodiment.

Referring to FIGS. 4A and 4B, the encoding apparatus (entropy encoder)may perform a residual coding procedure on (quantized) transformcoefficients. The encoding apparatus may perform residual coding on(quantized) transform coefficients in the current block (current codingblock (CB) or current transform block (TB)) according to a scan order asdescribed later in FIG. 6. The encoding apparatus, for example, maygenerate and encode various syntax elements related to residualinformation as described in Table 1 below. S400 and S410 may beincorporated into the residual information encoding procedure of FIG. 2.

TABLE 1 Descriptor residual_coding( x0, y0, log2TbWidth, log2TbHeight,cIdx ) { if( transform_skip_enabled_flag && ( cIdx ! = 0 | |cu_mts_flag[ x0 ][ y0 ] = = 0 ) && ( log2TbWidth <= 2 ) && (log2TbHeight <= 2 ) ) transform_skip_flag[ x0 ][ y0 ][ cIdx ] ae(v)last_sig_coeff_x_prefix ae(v) last_sig_coeff_y_prefix ae(v) if(last_sig_coeff_x_prefix > 3 ) last_sig_coeff_x_suffix ae(v) if(last_sig_coeff_y_prefix > 3 ) last_sig_coeff_y_suffix ae(v) log2SbSize =( Min( log2TbWidth, log2TbHeight ) < 2 ? 1 : 2 ) numSbCoeff = 1 << (log2SbSize << 1 ) lastScanPos = numSbCoeff lastSubBlock = ( 1 << (log2TbWidth + log2TbHeight − 2 * log2SbSize ) ) −1 do { if( lastScanPos= = 0 ) { lastScanPos = numSbCoeff lastSubBlock− − } lastScanPos− − xS =DiagScanOrder[ log2TbWidth − log2SbSize ][ log2TbHeight −log2SbSi ze ] [lastSubBlock ][ 0 ] yS = DiagScanOrder[ log2TbWidth − log2SbSize ][log2TbHeight −log2SbSi ze ] [ lastSubBlock ][ 1 ] xC = ( xS <<log2SbSize ) + DiagScanOrder[ log2SbSize ][ log2SbSize ][ lastScanPos ][0 ] yC = ( yS << log2SbSize ) + DiagScanOrder[ log2SbSize ][ log2SbSize][ lastScanPos ][ 1 ] } while( ( xC != LastSignificantCoeffX ) | | ( yC!= LastSignificantCoeffY ) ) QState = 0 for( i = lastSubBlock; i >= 0;i− − ) { startQStateSb = QState xS = DiagScanOrder[ log2TbWidth −log2SbSize ][ log2TbHeight −log2SbSi ze ] [ lastSubBlock ][ 0 ] yS =DiagScanOrder[ log2TbWidth − log2SbSize ][ log2TbHeight −log2SbSi ze ] [lastSubBlock ][ 1 ] inferSbDcSigCoeffFlag = 0 if( ( i < lastSubBlock )&& ( i > 0 ) ) { coded_sub_block_flag[ xS ][ yS ] ae(v)inferSbDcSigCoeffFlag = 1 } firstSigScanPosSb = numSbCoefflastSigScanPosSb = −1 for( n = ( i = = lastSubBlock ) ? lastScanPos − 1: numSbCoeff −1; n >= 0; n−− ) { xC = ( xS << log2SbSize ) +DiagScanOrder[ log2SbSize ][ log2SbSize ][ n ][ 0 ] yC = ( yS <<log2SbSize ) + DiagScanOrder[ log2SbSize ][ log2SbSize ][ n ][ 1 ] if(coded_sub_block_flag[ xS ][ yS ] && ( n > 0 | | !inferSbDcSigCoeffFlag )) { sig_coeff_flag[ xC ][ yC ] ae(v) } if( sig_coeff_flag[ xC ][ yC ] ){ par_level_flag[ n ] ae(v) rem_abs_gt1_flag[ n ] ae(v) if(lastSigScanPosSb = = −1 ) lastSigScanPosSb = n firstSigScanPosSb = n }AbsLevelPass1[ xC ][ yC ] = sig_coeff_flag[ xC ][ yC ] + par_level_flag[n ] + 2 * rem_abs_gt1_flag[ n ] if( dep_quant_enabled_flag ) QState =QStateTransTable[ QState ][ par_level_flag[ n ] ] } for( n = numSbCoeff− 1; n >= 0; n−− ) { if( rem_abs_gt1_flag[ n ] ) rem_abs_gt2_flag[ n ]ae(v) } for( n = numSbCoeff − 1; n >= 0; n−− ) { xC = ( xS << log2SbSize) + DiagScanOrder[ log2SbSize ][ log2SbSize ][ n ][ 0 ] yC = ( yS <<log2SbSize ) + DiagScanOrder[ log2SbSize ][ log2SbSize ][ n ][ 1 ] if(rem_abs_gt2_flag[ n ] ) abs_remainder[ n ] AbsLevel[ xC ][ yC ] =AbsLevelPass1[ xC ][ yC ] + 2 * ( rem_abs_gt2_flag[ n ] + abs_remainder[n ] ) } if( dep_quant_enabled_flag | | !sign_data_hiding_enabled_flag )signHidden = 0 else signHidden = ( lastSigScanPosSb −firstSigScanPosSb > 3 ? 1 : 0 ) for( n = numSbCoeff − 1; n >= 0; n−− ) {xC = ( xS << log2SbSize ) + DiagScanOrder[ log2SbSize ][ log2SbSize ][ n][ 0 ] yC = ( yS << log2SbSize ) + DiagScanOrder[ log2SbSize ][log2SbSize ][ n ][ 1 ] if( sig_coeff_flag[ xC ][ yC ] && ( !signHidden || ( n != firstSigScanPosSb ) ) ) coeff_sign_flag[ n ] ae(v) } if(dep_quant_enabled_flag ) { QState = startQStateSb for( n = numSbCoeff −1; n >= 0; n−− ) { xC = ( xS << log2SbSize ) + DiagScanOrder[ log2SbSize][ log2SbSize ][ n ][ 0 ] yC = ( yS << log2SbSize ) + DiagScanOrder[log2SbSize ][ log2SbSize ][ n ][ 1 ] if( sig_coeff_flag[ xC ][ yC ] )TransCoeffLevel[ x0 ][ y0 ][ cIdx ][ xC ][ yC ] = ( 2 * AbsLevel[ xC ][yC ] − ( QState > 1 1 : 0 ) ) * ( 1 − 2 * coeff_sign_flag[ n ] ) QState= QStateTransTable[ QState ][ par_level_flag[ n ] ] } else { sumAbsLevel= 0 for( n = numSbCoeff − 1; n >= 0; n−− ) { xC = ( xS << log2SbSize ) +DiagScanOrder[ log2SbSize ][ log2SbSize ][ n ][ 0 ] yC = ( yS <<log2SbSize ) + DiagScanOrder[ log2SbSize ][ log2SbSize ][ n ][ 1 ] if(sig_coeff_flag[ xC ][ yC ] ) { TransCoeffLevel[ x0 ][ y0 ][ cIdx ][ xC][ yC ] = AbsLevel[ xC ][ yC ] * ( 1 − 2 * coeff_sign_flag[ n ] ) if(signHidden ) { sumAbsLevel += AbsLevel[ xC ][ yC ] if( ( n = =firstSigScanPosSb ) && ( sumAbsLevel % 2 ) = = 1 ) ) TransCoeffLevel[ x0][ y0 ][ cIdx ][ xC ][ yC ] = −TransCoeffLevel[ x0 ][ y0 ][ cIdx ][ xC][ yC ] } } } } } if( cu_mts_flag[ x0 ][ y0 ] && ( cIdx = = 0 ) &&!transform_skip_flag[ x0 ][ y0 ][ cIdx ] && ( ( CuPredMode[ x0 ][ y0 ] == MODE_INTRA && numSigCoe ff > 2 ) | | ( CuPredMode[ x0 ][ y0 ] = =MODE_INTER ) ) ) { mts_idx[ x0 ][ y0 ] ae(v) }

The encoding apparatus may perform binarization on syntax elementsrelated to residual including last_sig_coeff_x_prefix andlast_sig_coeff_y_prefix (S400). The last_sig_coeff_x_prefix and thelast_sig_coeff_y_prefix may be derived based on position of a lastsignificant coefficient in a current block.

The last_sig_coeff_x_prefix and last_sig_coeff_y_prefix may represent anexample of last significant coefficient prefix information on positionof a last non-zero transform coefficient among the transformcoefficients for the current block. More specifically,last_sig_coeff_x_prefix may represent an example of an x-axis prefixinformation, which is one of the last significant coefficient prefixinformation, and last_sig_coeff y_prefix may represent an example of ay-axis prefix information, which is one of the last significantcoefficient prefix information.

In this case, zero may be used as a value of cRiceParam. The encodingapparatus may derive a bin string for each of thelast_sig_coeff_x_prefix and last_sig_coeff_y_prefix through thebinarization procedure. The binarization procedure may be performed by abinarizer 242 in the entropy encoder 240.

According to an embodiment, c Max value for each oflast_sig_coeff_x_prefix and last_sig_coeff_y_prefix may be derived basedon whether high frequency zeroing is applied. Specific equation forderiving c Max will be described later in FIG. 6. The c Max mayrepresent a maximum length of a codeword (bin string) derived in thebinarization procedure for last_sig_coeff_x_prefix orlast_sig_coeff_y_prefix. When decreasing the value of cMax, a length ofthe codeword for last_sig_coeff_x_prefix or last_sig_coeff_y_prefix canbe effectively shortened. And as the coded bin reduced by shortening thecodeword is a context coded bin, there may be an advantage in terms ofan image coding throughput.

Meanwhile, binarization may progress for the rest of syntax elements ofTable 1 according to a predetermined method. For example, binarizationmay be performed on transform_skip_flag, last_sig_coeff_x_suffix,last_sig_coeff_y_suffix, coded_sub_block_flag, sig_coeff_flag,par_level_flag, rem_abs_gt1_flag, rem_abs_gt2_flag, coeff_sign_flag,mts_idx, or the like according to a fixed-length binarization process,and on abs_remainder, binarization corresponding thereto may beperformed.

The encoding apparatus may perform entropy encoding on syntax elementsrelated to residual coding including the last_sig_coeff_x_prefix andlast_sig_coeff y_prefix (S410). The encoding apparatus may performentropy encoding based on a bin string for each of thelast_sig_coeff_x_prefix and last_sig_coeff_y_prefix. The encodingapparatus may context-based or bypass-based encode the bin string basedon a entropy coding technique such as context-adaptive arithmetic coding(CABAC) or context-adaptive variable length coding (CAVLC), and theoutput thereof may be incorporated into a bitstream. The entropyencoding procedure may be performed by an entropy encoding processor 244in the entropy encoder 240. The bitstream may include variousinformation for image/video decoding, such as prediction information orthe like, other than residual information including information onlast_sig_coeff_x_prefix and last_sig_coeff_y_prefix as described above.The bitstream may be transferred to the decoding apparatus through a(digital) storage medium or a network.

FIGS. 5A and 5B are a drawing for explaining the configuration andoperation method of an entropy decoder according to an embodiment.

Referring to FIGS. 5A and 5B, the decoding apparatus (entropy decoder)may derive (quantized) transform coefficients by decoding encodedresidual information. The decoding apparatus may derive (quantized)transform coefficients by decoding encoded residual information for acurrent block (current CB or current TB) as described later in FIG. 6.For example, the decoding apparatus may decode various syntax elementsrelated to such residual information as written in Table 1, analyzevalues of associated syntax elements, and derive the (quantized)transform coefficients based on a value of analyzed syntax elements.S500 to S510 may be incorporated into a procedure which derivesabove-described (quantized) transform coefficients of FIG. 3.

The decoding apparatus may perform binarization on syntax elementsrelated to residual including last_sig_coeff_x_prefix andlast_sig_coeff_y_prefix (S500). In this case, zero may be used as avalue of cRiceParam. The encoding apparatus may derive an available binstring for each available value of the last_sig_coeff_x_prefix andlast_sig_coeff_y_prefix through the binarization procedure. Thebinarization procedure may be performed by a binarizer 312 in theentropy decoder 310. According to an embodiment, c Max value for each oflast_sig_coeff_x_prefix and last_sig_coeff_y_prefix may be derived basedon whether high frequency zeroing is applied. Specific equation forderiving c Max will be described later in FIG. 6.

The c Max may represent a maximum length of a codeword (bin string)derived in the binarization procedure for last_sig_coeff_x_prefix orlast_sig_coeff_y_prefix. When decreasing the value of c Max, a length ofthe codeword for last_sig_coeff_x_prefix or last_sig_coeff_y_prefix canbe effectively shortened. And as the coded bin reduced by shortening thecodeword is a context coded bin, there may be an advantage in terms ofan image coding throughput.

Meanwhile, binarization may progress for the rest of syntax elements ofTable 1 according to a predetermined method. For example, binarizationmay be performed on transform_skip_flag, last_sig_coeff_x_suffix,last_sig_coeff_y_suffix, coded_sub_block_flag, sig_coeff_flag,par_level_flag, rem_abs_gt1_flag, rem_abs_gt2_flag, coeff_sign_flag,mts_idx, or the like according to a fixed-length binarization process,and on abs_remainder, binarization corresponding thereto may beperformed.

The decoding apparatus may perform entropy decoding on syntax elementsrelated to residual coding including the last_sig_coeff_x_prefix andlast_sig_coeff y_prefix (S510). The decoding apparatus may comparederived bin string with the available bin strings while parsing anddecoding sequentially each of bins for the last_sig_coeff_x_prefix. Whena derived bin string is the same as one of the available bin strings,the value corresponding to the bin string may be derived as a value ofthe last_sig_coeff_x_prefix. When a derived bin string is the same asnone of the available bin strings, the comparison procedure may beperformed after further parsing and decoding next bit in the bitstream.Further, the decoding apparatus may compare derived bin string with theavailable bin strings while parsing and decoding sequentially each ofbins for the last_sig_coeff_y_prefix. When a derived bin string is thesame as one of the available bin strings, the value corresponding to thebin string may be derived as a value of the last_sig_coeff_y_prefix.When a derived bin string is the same as none of the available binstrings, the comparison procedure may be performed after further parsingand decoding next bit in the bitstream. Through these processes, withoutusing a start bit or an end bit for specific information (specificsyntax element) in a bitstream, the information can be signaled using avariable length bit, by which relatively smaller bit can be assigned toa low value, thus increasing an overall coding efficiency.

The decoding apparatus may perform context-based or bypass-baseddecoding on each of bins in the bin string from a bitstream based on anentropy coding technique such as the CABAC, the CAVLC or the like. Theentropy decoding procedure may be performed by an entropy decodingprocessor 314 in the entropy decoder 310. The decoding apparatus mayderive a position of a last significant coefficient based on a value ofthe last_sig_coeff_x_prefix and a value of the last_sig_coeff_y_prefix.Specific calculation, for example, may be performed based on Table 2below.

TABLE 2 The column position of the last significant coefficient inscanning order within a transform block LastSignificantCoeffX is derivedas follows: // If last_sig_coeff_x_suffix is not present, the followingapplies:LastSignificantCoeffX = last_sig_coeff_x_prefix// Otherwise(last_sig_coeff_x_suffix is present), the followingapplies:LastSignificantCoeffX= (1<<((last_sig_coeff_x_prefix>>1)−1)) *(2+(last_sig_coeff_x_prefix&1)) + last_sig_coeff_x_suffix//The rowposition of the last significant coefficient in scanning order within atransform block LastSignificantCoeffY is derived as follows:// Iflast_sig_coeff_y_suffix is not present, the followingapplies:LastSignificantCoeffY = last_sigcoeff_y_prefix// Otherwise(last_sig_coeff_y_suffix is present), the followingapplies:LastSignificantCoeffY=(1<<((last_sig_coeff_y_prefix>>1)−))*(2+(last_sig_coeff_y_prefix&1))+last_sig_coeff_y_suffix

In Table 2, LastSignificantCoeffX may represent and x-axis position of alast non-zero significant coefficient in the current (transform) block,and, LastSignificantCoeffY may represent a y-axis position of a lastnon-zero significant coefficient in the current (transform) block.

The bitstream may include various information for image/video decoding,such as prediction information or the like, other than residualinformation including information on last_sig_coeff_x_prefix andlast_sig_coeff_y_prefix as described above. As described above, thebitstream may be transferred to the decoding apparatus through a(digital) storage medium or a network.

The decoding apparatus may derive residual samples for a current blockby performing a dequantization procedure and/or an inverse transformprocedure based on the (quantized) transform coefficients. Reconstructedsamples may be generated based on the residual samples and predictionsamples derived through inter/intra prediction, and a reconstructedpicture including the reconstructed samples may be generated.

FIG. 6 is a drawing for explaining high frequency zeroing according toan example.

In the present specification, “high frequency zeroing” means a processby which transform coefficients related to a frequency equal to orhigher than a certain value in a (transform) block having a first widthsize (or length) W₁ and a first height size (or length) H₁ are zeroed(i.e., determined as zero). When high frequency zeroing is applied, thetransform coefficient values of the transform coefficients outside a lowfrequency transform coefficient region configured based on a secondwidth size W₂ and a second height size H₂ among transform coefficientsin the (transform) block may be all determined (set) as zero. Theoutside of the low frequency transform coefficient region may bereferred to as a high frequency transform coefficient region. In anexample, the low frequency transform coefficient region may be a regionof a rectangular shape located from a top-left end of the (transform)block.

In the present specification, a specific term or sentence is used fordefining a specific information or concept. For example, in the presentspecification, as described above, the process by which transformcoefficients related to a frequency equal to or higher than a certainvalue in the (transform) block having the first width size (or length)W₁ and the first height size (or length) H₁ are zeroed is defined as“high frequency zeroing”; a region on which zeroing has been performedthrough the high frequency zeroing, “high frequency transformcoefficient region”; and a region on which the zeroing is not performed,“low frequency transform coefficient region”. In order to represent asize of the low frequency transform coefficient region, the second widthsize (or length) W₂ and the second height size (or length) H₂ are used.

However, the term “high frequency zeroing” may be replaced by variousterms such as a highfrequency zeroing, a high frequency zero-out,zero-out or the like; the term “high frequency transform coefficientregion”, various terms such as a high frequency zeroing applied region,a high frequency zeroing region, a high frequency region, a highfrequency coefficient region, a high frequency zero-out region, azero-out region or the like; and the term “low frequency transformcoefficient region”, various terms such as a high frequency zeroingnon-applied region, a low frequency region, a low frequency coefficientregion, a restricted region, or the like. So, in the presentspecification, when interpreting throughout the specification a specificterm or sentence used for defining a specific information or concept, itis necessary to pay attention to various operations, functions andeffects according to contents which the term intends to represent ratherbeing limited to its name.

In an example, there may be proposed a method for performingbinarization of syntax elements, last_sig_coeff_x_prefix andlast_sig_coeff_y_prefix, for a (transform) block (TB, TU or CB) to whichthe high frequency zeroing is applied. last_sig_coeff_x_prefix andlast_sig_coeff_y_prefix may be binarized with a truncated Rice code, andat this time, a value of cRiceParam may use 0. A value of c Max used inbinarization for the truncated Rice code may be determined based onEquation 1 when performing the binarization of last_sig_coeff_x_prefix,and be determined based on Equation 2 when performing the binarizationof last_sig_coeff_y_prefix.c Max=(log₂ W ₁<<1)−1  [Equation 1]c Max=(log₂ H ₁<<1)−1  [Equation 2]

where W₁ may represent a width length (or width) of the (transform)block, and H₁ may represent a height length (or height) of the(transform) block. For example, in the case of a 64×32 transform blockas in FIG. 6, W₁ is 64, and H₁ is 32. Therefore, the value of c Max forbinarization of last_sig_coeff_x_prefix may be 11, and the value of cMax for binarization of last_sig_coeff_y_prefix may be 9.

Table 3 below represents binarization when W₁ or H₁ is 32, and Table 4below represents binarization codeword when W₁ or H₁ is 64. In anexample, the truncated Rice code binarization may be performed based ona size of the transform block, and thus, as in Table 4 below, thecodeword of last_sig_coeff_x_prefix or last_sig_coeff_y_prefix for thecoding for the value of LastSignificantCoeffX or LastSignificantCoeffYbeing 32 to 47 may be ‘11111111110’, and the codeword oflast_sig_coeff_x_prefix or last_sig_coeff_y_prefix for the coding forthe value of LastSignificantCoeffX or LastSignificantCoeffY being 48 to63 may be ‘11111111111’. In both cases, the binarization may beperformed based on 11 bins. The codeword may be called a bin string.

TABLE 3 LastSignifi- cantCoeffXorLastSignifi- length of the cantCoeffYcodeword codeword 0 0 1 1 10 2 2 110 3 3 1110 4 4, 5 11110 5 6, 7 1111106  8~11 1111110 7 12~15 11111110 8 16~23 111111110 9 24~31 111111111 9

TABLE 4 LastSignifi- cantCoeffXorLastSignifi- length of the cantCoeffYcodeword codeword 0 0 1 1 10 2 2 110 3 3 1110 4 4, 5 11110 5 6, 7 1111106  8~11 1111110 7 12~15 11111110 8 16~23 111111110 9 24~31 1111111110 1032~47 11111111110 11 48~63 11111111111 11

As shown in Table 1 above, when the value of last_sig_coeff_x_prefix isgreater than 3, last_sig_coeff x_suffix may be further signaled, andLastSignificantCoeffX may be derived based on the value oflast_sig_coeff_x_suffix. For example, the codeword oflast_sig_coeff_x_prefix for the coding for the value ofLastSignificantCoeffX being 32 to 47 may be ‘11111111110’, and whichvalue among 32 to 47 will be used may be determined based on the valueof last_sig_coeff_x_suffix. As shown in Table 1 above, when the value oflast_sig_coeff_y_prefix is greater than 3, last_sig_coeff_y_suffix maybe further signaled, and LastSignificantCoeffY may be derived based onthe value of last_sig_coeff_y_suffix. For example, the codeword oflast_sig_coeff_x_prefix for the coding for the value ofLastSignificantCoeffY being 32 to 47 may be ‘11111111110’, and whichvalue among 32 to 47 will be used may be determined based on the valueof last_sig_coeff_y_suffix.

Specific calculation for deriving LastSignificantCoeffX orLastSignificantCoeffY may be performed like, for example, the following.

TABLE 5 The column position of the last significant coefficient inscanning order within a transform block LastSignificantCoeffX is derivedas follows: // If last_sig_coeff_x_ suffix is not present, the followingapplies:LastSignificantCoeffX = last_sig_coeff_x_prefix// Otherwise(last_sig_coeff_x_suffix is present), the followingapplies:LastSignificantCoeffX= (1<<((last_sig_coeff_x_prefix>>1)−1)) *(2+(last_sig_coeff_x_prefix&1)) + last_sig_coeff_x_suffix// The rowposition of the last significant coefficient in scanning order within atransform block LastSignificantCoeffY is derived as follows:// Iflast_sig_coeff_y_suffix is not present, the followingapplies:LastSignificantCoeffY = last_sigcoeff_y_prefix// Otherwise(last_sig_coeff_y_suffix is present), the followingapplies:LastSignificantCoeffY=(1<<((last_sig_coeff_y_prefix>>1)−1))*(2+(last_sig_coeff_y_prefix&1))+last_sig_coeff_y_suffix

The high frequency zeroing means zeroing coefficients of a frequencyhigher than a certain value in a transform block having a first widthsize W₁ or a first height size H₁ (i.e., determined as zero), andlimiting residual transform coefficients to a second width size W₂ or asecond height size H₂. At this time, in an example, a method in whichthe binarization is performed based on a truncated Rice code based on asize (second width size or second height size) of a restricted regionderived through the high frequency zeroing may be considered, ratherthan a method in which binarization is performed based on a truncatedRice code based on a size (first width size or first height size) of atransform block. After defining c Max for last_sig_coeff_x_prefix and cMax for last_sig_coeff_y_prefix as Equations 3 and 4, respectively,using the second width size and the second height size, the truncatedRice code may be generated.c Max=(log₂(min(W ₁ ,W ₂))<<1)−1  [Equation 3]c Max=(log₂(min(H ₁ ,H ₂))<<1)−1  [Equation 4]

In an example, when the first width size or first height size is 64 andthe second width size or the second height size is 32, the truncatedRice code derived based on Equations 3 and 4 may be like Table 6 below.Through the high frequency zeroing, residual transform coefficient isdisappeared from high frequency coefficients in a high frequencytransform coefficient region formed outside the second width size or thesecond height size, so it is possible to design a binarization codewordlike Table 6 below.

In an example, W₂ and H₂ may be set as a fixed value. Alternatively, W₂and H₂ may be determined based on W₁ and H₁. Alternatively, informationindicating W₂ and H₂ may be signaled from an encoding apparatus to adecoding apparatus. In an example, W₂ and H₂ may be set as 32 or 16,respectively. In another example, W₂ and H₂ may be derived as a half ofW₁ and a half of H₁, respectively. In still another example, W₂ and H₂may be derived as a half of max(W₁, H₁). However, these are examples,and W₂ and H₂ may be determined according to other various methods setin an encoding apparatus and a decoding apparatus. Through the proposedmethod, it is possible to effectively reduce the length of a codewordfor some values of LastSignificantCoeffX or LastSignificantCoeffY.Further, as the coded bin reduced through this is a context-coded bin,there may be an advantage in terms of a throughput.

TABLE 6 LastSignifi- cantCoeffXorLastSignifi- length of the cantCoeffYcodeword codeword 0 0 1 1 10 2 2 110 3 3 1110 4 4, 5 11110 5 6, 7 1111106  8~11 1111110 7 12~15 11111110 8 16~23 111111110 9 24~31 111111111 932~47 N/A N/A 48~43 N/A N/A

In an example, the residual coding method described above in FIGS. 4A to5B may be performed based on examples described in FIG. 6. In anotherexample, an encoding method to be described later in FIG. 7 or adecoding method to be described later in FIG. 9 may be performed basedon examples described in FIG. 6.

FIG. 7 is a flowchart showing operation of an encoding apparatusaccording to an example, and FIG. 8 is a block diagram showing aconfiguration of an encoding apparatus according to an example.

The encoding apparatus according to FIGS. 7 and 8 may perform anoperation corresponding to that of a decoding apparatus according toFIGS. 9 and 10. Therefore, operations of the decoding apparatus to bedescribed later in FIGS. 9 and 10 can be likely applied to the encodingapparatus according to FIGS. 7 and 8.

Each of steps disclosed in FIG. 7 may be performed by the encodingapparatus 200 disclosed in FIG. 2. More specifically, S700 may beperformed by the subtractor 231 disclosed in FIG. 2; S710, thetransformer 232 disclosed in FIG. 2; S720, the quantizer 233 disclosedin FIG. 2; and S730, the entropy encoder 240 disclosed in FIG. 2.Further, operations according to S700 to S730 are based on some ofcontents described above in FIGS. 4 to 6. Therefore, an explanation forthe specific content duplicated with contents described above in FIG. 2,and 4 to 6 will be omitted or made briefly.

As shown in FIG. 8, the encoding apparatus according to an example mayinclude the subtractor 231, the transformer 232, the quantizer 233, andthe entropy encoder 240. However, according to circumstances, all thecomponents shown in FIG. 8 may not be essential components of theencoding apparatus, and the encoding apparatus may be embodied by moreor less components than those shown in FIG. 8.

In the encoding apparatus according to an example, each of thesubtractor 231, the transformer 232, the quantizer 233, and the entropyencoder 240 may be embodied by a separate chip, or at least two or morecomponents may be embodied through a single chip.

The encoding apparatus according to an example may derive residualsamples for a current blcok (S700). More specifically, the subtractor231 of the encoding apparatus may derive residual samples for thecurrent block.

The encoding apparatus according to an example may derive transformcoefficients for the current block by transforming the residual samplesfor the current block (S710). More specifically, the transformer 232 ofthe encoding apparatus may derive transform coefficients for the currentblock by transforming the residual samples for the current block.

The encoding apparatus according to an example may derive quantizedtransform coefficients from the transform coefficients based on aquantization process (S720). More specifically, the quantizer 233 of theencoding apparatus may derive quantized transform coefficients from thetransform coefficients based on a quantization process.

The encoding apparatus according to an example may encode residualinformation including information on the quantized transformcoefficients (S730). More specifically, the encoder 240 of the encodingapparatus may encode the residual information including information onthe quantized transform coefficients.

In an example, each of the transform coefficients for the current blockmay be related to a high frequency transform coefficient regionconsisting of transform coefficient 0, or a low frequency transformcoefficient region including at least one significant transformcoefficient.

In an example, the residual information includes last significantcoefficient prefix information and last significant coefficient suffixinformation on position of last non-zero transform coefficient among thetransform coefficients for the current block.

In an example, the position of the last non-zero transform coefficientmay be based on prefix codeword, which represents the last significantcoefficient prefix information, and the last significant coefficientsuffix information.

In an example, a maximum length of the prefix codeword may be determinedbased on a size of the low frequency transform coefficient region.

According to the encoding apparatus and the operation method of theencoding apparatus of FIGS. 7 and 8, the encoding apparatus may derivethe residual samples for the current block (S700), derive the transformcoefficients for the current block by transforming the residual samplesfor the current block (S710), derive the quantized transformcoefficients from the transform coefficients based on a quantizationprocess (S720), and encode the residual information including theinformation on the quantized transform coefficients (S730), wherein eachof the transform coefficients for the current block may be related to ahigh frequency transform coefficient region consisting of transformcoefficient 0, or a low frequency transform coefficient region includingat least one significant transform coefficient, the residual informationmay include last significant coefficient prefix information and lastsignificant coefficient suffix information on position of a lastnon-zero transform coefficient among the transform coefficients for thecurrent block, the position of the last non-zero transform coefficientmay be based on prefix codeword, which represents the last significantcoefficient prefix information, and the last significant coefficientsuffix information, and a maximum length of the prefix codeword may bedetermined based on a size of the low frequency transform coefficientregion. That is, according to the present disclosure, when the highfrequency zeroing is applied, by performing binarization on a syntaxelement based on the size of the high frequency zeroing region (morecorrectly, a region to which the high frequency zeroing is not applied),it is possible to perform coding more efficiently, and improve thethroughput of CAB AC by reducing the number of context-coded bins.

FIG. 9 is a flowchart showing operation of a decoding apparatusaccording to an example, and FIG. 10 is a block diagram showing aconfiguration of a decoding apparatus according to an example.

Each of steps disclosed in FIG. 9 may be performed by the decodingapparatus 300 disclosed in FIG. 3. More specifically, S900 and S910 maybe performed by the entropy decoder 310 disclosed in FIG. 3; S920, thedequantizer 321 disclosed in FIG. 3; S930, the inverse transformer 322disclosed in FIG. 3; and S940, the adder 340 disclosed in FIG. 3.Further, operations according to S900 to S940 are based on some ofcontents described above in FIGS. 4 to 6. Therefore, an explanation forthe specific content duplicated with contents described above in FIGS. 3to 6 will be omitted or made briefly.

As shown in FIG. 10, the decoding apparatus according to an example mayinclude the entropy decoder 310, the dequantizer 321, the inversetransformer 322, and the adder 340. However, according to circumstances,all the components shown in FIG. 10 may not be essential components ofthe decoding apparatus, and the decoding apparatus may be embodied bymore or less components than those shown in FIG. 10.

In the decoding apparatus according to an example, each of the entropydecoder 310, the dequantizer 321, the inverse transformer 322, and theadder 340 may be embodied by a separate chip, or at least two or morecomponents may be embodied through a single chip.

The decoding apparatus according to an example may receive a bitstreamincluding residual information (S900). More specifically, the entropydecoder 310 of the decoding apparatus may receive a bitstream includingresidual information.

The decoding apparatus according to an example may derive quantizedtransform coefficients for a current block based on residual informationincluded in a bitstream (S910). More specifically, the entropy decoder310 of the decoding apparatus may derive the quantized transformcoefficient for the current block based on the residual informationincluded in the bitstream.

The decoding apparatus according to an example may derive transformcoefficients from the quantized transform coefficients based on adequantization process (S920). More specifically, the dequantizer 321 ofthe decoding apparatus may derive the transform coefficients from thequantized transform coefficients based on the dequantization process.

The decoding apparatus according to an example may derive residualsamples for the current block by applying inverse transform to thederived transform coefficients (S920). More specifically, the inversetransformer 322 of the decoding apparatus may derive the residualsamples for the current block by applying the inverse transform to thederived transform coefficients.

The decoding apparatus according to an example may generate areconstructed picture based on the residual sample for the current block(S940). More specifically, the adder 340 of the decoding apparatus maygenerate the reconstructed picture based on the residual sample for thecurrent block.

In an example, a unit of the current block may be a transform block TB.

In an example, each of the transform coefficients for the current blockmay be related to a high frequency transform coefficient regionconsisting of transform coefficient 0, or a low frequency transformcoefficient region including at least one significant transformcoefficient.

In an example, the residual information may include last significantcoefficient prefix information and last significant coefficient suffixinformation on position of last non-zero transform coefficient among thetransform coefficients for the current block.

In an example, the position of the last non-zero transform coefficientmay be determined based on prefix codeword, which represents the lastsignificant coefficient prefix information, and the last significantcoefficient suffix information.

In an example, a maximum length of the prefix codeword may be determinedbased on a size of the low frequency transform coefficient region. Themaximum length of the prefix codeword may be expressed as c Max.

In an example, the size of the low frequency transform coefficientregion may be determined based on a width and height of the lowfrequency transform coefficient region.

In an example, the last significant coefficient prefix information mayinclude x-axis prefix information and y-axis prefix information, and theprefix codeword may be a codeword for the x-axis prefix information or acodeword for the y-axis prefix information.

In an example, the x-axis prefix information may be expressed aslast_sig_coeff_x_prefix; the y-axis prefix information may be expressedas last_sig_coeff_y_prefix; and the position of the last non-zerotransform coefficient may be expressed as (LastSignificantCoeffX,LastSignificantCoeffY).

In an example, the maximum length of the codeword, which indicates thex-axis prefix information, may be determined to be 9 based ondetermination that the width of the low frequency transform coefficientregion is 32.

In an example, the maximum length of the codeword, which indicates they-axis prefix information, may be determined to be 9 based ondetermination that the height of the low frequency transform coefficientregion is 32.

In an example, a maximum binarized value of the codeword for the x-axisprefix information may be determined to be 111111111 based ondetermination that a width of the current block is greater than 32, andthat the width of the low frequency transform coefficient region is 32.

In an example, a maximum binarized value of the codeword for the y-axisprefix information may be determined to be 111111111 based ondetermination that a height of the current block is greater than 32, andthat the height of the low frequency transform coefficient region is 32.

In an example, a maximum length of the codeword for the x-axis prefixinformation may be determined based on Equation 5 below.c Max_(x)=(log₂(min(W ₁ ,W ₂))<<1)−1  [Equation 5]

In Equation 5, c Max_(x) may be the maximum length of the codeword forthe x-axis prefix information; the W₁, a width of the current block; andthe W₂, a width of the low frequency transform coefficient region.

In an example, the width of the low frequency transform coefficientregion may be 32, and the maximum length of the codeword for the x-axisprefix information may be determined based on Equation 6 below.c Max_(x)=(min(log₂ W ₁,5))<<1)−1  [Equation 6]

In Equation 6, c Max_(x) may be the maximum length of the codeword forthe x-axis prefix information, and the W₁ may be a width of the currentblock.

In an example, a maximum length of the codeword for the y-axis prefixinformation may be determined based on Equation 7 below.c Max_(y)=(log₂(min(H ₁ ,H ₂))<<1)−1  [Equation 7]

In Equation 7, c Max_(y) may be the maximum length of the codeword forthe y-axis prefix information; the H₁, a height of the current block;and the H₂, a height of the low frequency transform coefficient region.

In an example, the height of the low frequency transform coefficientregion may be 32, and the maximum length of the codeword for the y-axisprefix information may be determined based on Equation 8 below.c Max_(y)=(min(log₂ H ₁,5))<<1)−1  [Equation 8]

In Equation 8, c Max_(y) may be the maximum length of the codeword forthe x-axis prefix information, and the H₁ may be a height of the currentblock.

In an example, the prefix codeword may be a truncated Rice code based ona truncated Rice binarization process.

In an example, the current block may be a square block or a non-squareblock. The width of the low frequency transform coefficient region maybe determined to be 32 based on determination that the width of thecurrent block is 64, and the height of the low frequency transformcoefficient region may be determined to be 32 based on determinationthat the height of the current block is 64.

In an example, the size of the low frequency transform coefficientregion may be one of 32×16, 16×32, 16×16 or 32×32.

In an example, the size of the low frequency transform coefficientregion may be determined based on a size of the current block.

In an example, the residual information may include information on thesize of the low frequency transform coefficient region.

In an example, the size of the current block may be 64×64; the size ofthe low frequency transform coefficient region, 32×32; and a maximumlength of the prefix codeword, 9.

According to the decoding apparatus and the operation method of thedecoding apparatus of FIGS. 9 and 10, the decoding apparatus may receivea bitstream including residual information (S900), derive quantizedtransform coefficients for a current block based on the residualinformation included in the bitstream (S910), derive transformcoefficients from the quantized transform coefficients based on adequantization process (S920), and derive residual samples for thecurrent block by applying inverse transform to the derived transformcoefficients (S930), and generate a reconstructed picture based onresidual samples for the current block (S940), wherein each of thetransform coefficients for the current block may be related to a highfrequency transform coefficient region consisting of transformcoefficient 0, or a low frequency transform coefficient region includingat least one significant transform coefficient, the residual informationmay include last significant coefficient prefix information and lastsignificant coefficient suffix information on position of last non-zerotransform coefficient among the transform coefficients for the currentblock, the position of the last non-zero transform coefficient may bedetermined based on prefix codeword, which represents the lastsignificant coefficient prefix information, and the last significantcoefficient suffix information, and a maximum length of the prefixcodeword may be determined based on a size of the low frequencytransform coefficient region. That is, according to the presentdisclosure, when the high frequency zeroing is applied, by performingbinarization on a syntax element based on the size of the high frequencyzeroing region (more correctly, a region to which the high frequencyzeroing is not applied), it is possible to perform coding moreefficiently, and improve the throughput of CABAC by reducing the numberof context-coded bins.

In an example, the residual coding process described above in FIGS. 4 to10 may be based on the content of English specification below.

Abstract

In this proposal, the binarization of last significant coefficientposition is modified to reduce the maximum number of context coded bins.Specifically, the number of context coded bins for large block (i.e.,64×64, 64×N, N×64) in worst case scenario is reduced from 11 to 9.Experimental results show 0.01%, 0%, and −0.02% BD-rate reductions on Y,Cb, and Cr components, respectively, compared to VTM3.0 in all-intraconfiguration, and 0.01%, −0.01%, and −0.01% BD-rate reductions inrandom access configuration.

1 Introduction

It is known that large block partitions typically present less residualsand the energy is more concentrated in low-frequency coefficients in thetransform domain. In VTM3.0 [1], high frequency transform coefficientsare zeroed out for the transform blocks with size (width or height, orboth width and height) equal to 64. Thus, for a W×H transform block,where W indicates the block width and H the block height, only thetop-left (W==64?32:W)×(H==64?32:H) transform coefficients are retained.

In [1], the prefix last_sig_coeff_x_prefix and last_sig_coeff_y_prefixare both context coded using truncated Rice binarization with c Max=(log2TbSize<<1)−1. Here, if the syntax element to be parsed islast_sig_coeff_x_prefix, log 2TbSize is set equal to log 2TbWidth andotherwise, log 2TbSize is set equal to log 2TbHeight. That is, themaximum possible magnitude is determined by the transform block width orheight. In the worst case scenario, the number of the bins that usecontext modelling is equal to 11. Table 7 shows the binarization forW=64 or H=64 in VTM3.0, wherein X means 0 or 1.

TABLE 7 Magnitude of lastlast_sig_coeff_x_prefixorlast_sig_coeff_y_prefix(contextlast_sig_coeff_x_suffixorlast_sig_coeff_y_suffix(bypass positioncomponent coded bin) bin) 0 0 1 10 2 110 3 1110 4, 5 11110 X 6, 7 111110X  8~11 1111110 XX 12~15 11111110 XX 16~23 111111110 XXX 24~311111111110 XXX 32~47 11111111110 XXXX 48~63 11111111111 XXXX

2. Proposed Method

This contribution is proposed on top of JVET-M0250 [2]. In the proposedmethod, whether the current coefficient group belongs to thehigh-frequency zeroing region is checked. Using this information, theunnecessary coded_sub_block_flag (CSBF) coding for the high-frequencyzeroing region can be skipped.

In one embodiment, CSBF coding method considering the high-frequencyzeroing region may be proposed. If a first condition for Last or firstcoefficient group is satisfied, the value of CSBF may be inferred to 1.If the first condition for last or first coefficient group is notsatisfied, a second condition for high-frequency zeroing region ischecked. If the second condition for high-frequency zeroing region issatisfied, there is no CSBF coding. If the second condition forhigh-frequency zeroing is not satisfied, context index is derived andCSBF coding is performed.

A last position coding scheme is proposed for large block-sizetransforms. Compared to VTM3.0, the proposed coding scheme uses lesscontext coded bins in the worst case scenario. The codeword in theproposed scheme still starts with a truncated Rice code and followed bya fixed length code. After high-frequency zeroing, for a WxH transformblock, only the top-left min(W, 32)×min(H, 32) transform coefficientsare kept. Thus, the maximum possible codeword length of the prefixlast_sig_coeff_x_prefix or last_sig_coeff_y_prefix is derived as: cMax=(min(log 2TbSize, 5)<<1)−1.

Table 8 shows the binarization for W=64 or H=64, wherein X means 0 or 1.Here, the different parts are emphasized.

TABLE 8 Magnitude of lastlast_sig_coeff_x_prefixorlast_sig_coeff_y_prefix(contextlast_sig_coeff_x_suffixorlast_sig_coeff_y_suffix(bypass positioncomponent coded bin) bin) 0 0 1 10 2 110 3 1110 4, 5 11110 X 6, 7 11110X  8~11 1111110 XX 12~15 11111110 XX 16~23 111111110 XXX 24~31 111111111XXX 32~47 N/A N/A 48~63 N/A N/A

TABLE 9 Magnitude of last position campatient VTM3.0 Proposed method 0 11 1 2 2 2 3 3 3 4 4 4, 5 5 5 6, 7 6 6  8~11 7 7 12~15 8 8 16~23 9 924~31 10 9 32~47 11 N/A 48~63 11 N/A

Table 9 shows comparison of codeword length for the prefix (contextcoded bins) when W=64 or H=64 and VTM3.0. The context coded bins can beas long as 9 in the proposed method, while it is up to 11 bins inVTM3.0. Note that when the magnitude of the last position component inthe range of 24-31, the number of context coded bins is reduced from 10to 9.

3. Experimental Results

The proposed method has been implemented on the VTM3.0 software. Thesimulations were performed following the common test conditions definedin JVET-L1010 [3]. In every case, the anchor is the VTM3.0 software.Encoding time and decoding time come from the cross-check results [4].Table 10 shows Experimental results for all-intra (AI) test condition;anchor is VTM3.0

TABLE 10 All Intra Main10 Over VTM-3.0 Y U V EncT DecT Class A1 0.03%−0.07% 0.03% 100% 101% Class A2 0.02% 0.00% −0.03% 100% 100% Class B0.01% 0.05% −0.02% 100% 102% Class C 0.00% 0.01% −0.03% 100% 101% ClassE 0.02% −0.02% −0.03% 100%  99% Overall 0.01% 0.00% −0.02% 100% 101%Class D 0.00% 0.01% −0.01% 100% 100% Class F −0.01% 0.03% 0.02% 100% 99%

Table 11 shows Experimental results for random-access (RA) testcondition; anchor is VTM3.0

TABLE 11 Random access Main10 Over VTM-3.0 Y U V EncT DecT Class A10.05% −0.09% 0.00% Class A2 0.01% 0.07% 0.03% Class B −0.01% −0.02%−0.04% 100% 100% Class C 0.00% 0.02% −0.01%  99% 100% Class E Overall0.01% −0.01% −0.01% Class D 0.00% 0.03% 0.00% 100% 100% Class F −0.01%−0.03% −0.07% 100%  99%

4. Reference

[1] B. Bross, et al., “Versatile Video Coding (Draft 3),” Joint VideoExploration Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC1/SC 29/WG 11JVET-L1001, 12^(th) meeting, Macao, CN, 3-12 Oct. 2018.

[2] J. Choi, et al., “Non-CE7: Simplified CSBF coding for largeblock-size transforms,” Joint Video Exploration Team (JVET) of ITU-T SG16 WP 3 and ISO/IEC JTC1/SC 29/WG 11 JVET-M0250, 13th meeting,Marrakech, Mass., 9-18 Jan. 2019.

[3] F. Bossen, et al., “JVET common test conditions and softwarereference configurations for SDR video” Joint Video Exploration Team(JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC1/SC 29/WG 11 JVET-L1010, 12thMeeting, Macao, CN, 3-12 Oct. 2018.

[4] H. Schwarz, “Crosscheck of JVET-M0251 (Non-CE7: Last position codingfor large block-size transforms),” Joint Video Exploration Team (JVET)of ITU-T SG 16 WP 3 and ISO/IEC JTC1/SC 29/WG 11 JVET-M0646, 13thmeeting, Marrakech, Mass., 9-18 Jan. 2019.

5. Patent Rights Declaration(s)

LG Electronics Inc. may have current or pending patent rights relatingto the technology described in this contribution and, conditioned onreciprocity, is prepared to grant licenses under reasonable andnon-discriminatory terms as necessary for implementation of theresulting ITU-T Recommendation|ISO/IEC International Standard (per box 2of the ITU-T/ITU-R/ISO/IEC patent statement and licensing declarationform).

6. Specification

TABLE 12 Descriptor residual_coding( x0, y0, log2TbWidth, log2TbHeight,cIdx ) { if( transform_skip_enabled_flag && ( cIdx ! = 0 | |tu_mts_flag[ x0 ][ y0 ] = = 0 ) && ( log2TbWidth <= 2 ) && (log2TbHeight <= 2 ) ) transform_skip_flag[ x0 ][ y0 ][ cIdx ] ae(v)last_sig_coeff_x_prefix ae(v) last_sig_coeff_y_prefix ae(v) if(last_sig_coeff_x_prefix > 3 ) last_sig_coeff_x_suffix ae(v) if(last_sig_coeff_y_prefix > 3 ) last_sig_coeff_y_suffix ae(v) log2SbSize =( Min( log2TbWidth, log2TbHeight ) < 2 ? 1 : 2 ) numSbCoeff = 1 << (log2SbSize << 1 ) lastScanPos = numSbCoeff log2TbWidth = Min(log2TbWidth, 5 ) log2TbHeight = Min( log2TbHeight, 5 ) lastSubBlock = (1 << ( log2TbWidth + log2TbHeight − 2 * log2SbSize ) ) −1 do { if(lastScanPos = = 0 ) { lastScanPos = numSbCoeff lastSubBlock− − }lastScanPos− − xS = DiagScanOrder[ log2TbWidth − log2SbSize ][log2TbHeight −log2SbSi ze ] [ lastSubBlock ][ 0 ] yS = DiagScanOrder[log2TbWidth − log2SbSize ][ log2TbHeight −log2SbSi ze ] [ lastSubBlock][ 1 ] xC = ( xS << log2SbSize ) + DiagScanOrder[ log2SbSize ][log2SbSize ][ lastScanPos ][ 0 ] yC = ( yS << log2SbSize ) +DiagScanOrder[ log2SbSize ][ log2SbSize ][ lastScanPos ][ 1 ] } while( (xC != LastSignificantCoeffX ) | | ( yC != LastSignificantCoeffY ) )numSigCoeff = 0 QState = 0 for( i = lastSubBlock; i >= 0; i− − ) {startQStateSb = QState xS = DiagScanOrder[ log2TbWidth − log2SbSize ][log2TbHeight −log2SbSi ze ] [ lastSubBlock ][ 0 ] yS = DiagScanOrder[log2TbWidth − log2SbSize ][ log2TbHeight −log2SbSi ze ] [ lastSubBlock][ 1 ] inferSbDcSigCoeffFlag = 0 if( ( i < lastSubBlock ) && ( i > 0 ) ){ coded_sub_block_flag[ xS ][ yS ] ae(v) inferSbDcSigCoeffFlag = 1 }firstSigScanPosSb = numSbCoeff lastSigScanPosSb = −1 remBinsPass1 = (log2SbSize < 2 ? 6 : 28 ) remBinsPass2 = ( log2SbSize < 2 ? 2 : 4 )firstPosMode0 = ( i = = lastSubBlock ? lastScanPos − 1 : numSbCoeff −1 )firstPosMode1 = −1 firstPosMode2 = −1 for( n = ( i = = firstPosMode0;n >= 0 && remBinsPass1 >= 3; n− − ) { xC = ( xS << log2SbSize ) +DiagScanOrder[ log2SbSize ][ log2SbSize ][ n ][ 0 ] yC = ( yS <<log2SbSize ) + DiagScanOrder[ log2SbSize ][ log2SbSize ][ n ][ 1 ] if(coded_sub_block_flag[ xS ][ yS ] && ( n > 0 | | !inferSbDcSigCoeffFlag )) { sig_coeff_flag[ xC ][ yC ] ae(v) remBinsPass1− − if( sig_coeff_flag[xC ][ yC ] ) inferSbDcSigCoeffFlag = 0 } if( sig_coeff_flag[ xC ][ yC ]) { numSigCoeff++ abs_level_gt1_flag[ n ] ae(v) remBinsPass1− − if(abs_level_gt1_flag[ n ] ) { par_level_flag[ n ] ae(v) remBinsPass1− −if( remBinsPass2 > 0 ) { remBinsPass2− − if( remBinsPass2 = = 0 )firstPosMode1 = n − 1 } } if( lastSigScanPosSb = = −1 ) lastSigScanPosSb= n firstSigScanPosSb = n } AbsLevelPass1[ xC ][ yC ] = sig_coeff_flag[xC ][ yC ] + par_level_flag[ n ] + abs_level_gt1_flag[ n ] if(dep_quant_enabled_flag ) QState = QStateTransTable[ QState ][AbsLevelPass1[ xC ][ yC ] & 1 ] if( remBinsPass1 < 3 ) firstPosMode2 = n− 1 } if( firstPosMode1 < firstPosMode2 ) firstPosMode1 = firstPosMode2for( n = numSbCoeff − 1; n >= firstPosMode2; n−− ) if(abs_level_gt1_flag[ n ] ) abs_level_gt3_flag[ n ] ae(v) for( n =numSbCoeff − 1; n >= firstPosMode1; n−− ) { xC = ( xS << log2SbSize ) +DiagScanOrder[ log2SbSize ][ log2SbSize ][ n ][ 0 ] yC = ( yS <<log2SbSize ) + DiagScanOrder[ log2SbSize ][ log2SbSize ][ n ][ 1 ] if(abs_level_gt3_flag[ n ] ) abs_remainder[ n ] ae(v) AbsLevel[ xC ][ yC ]= AbsLevelPass1[ xC ][ yC ] + 2 * ( abs_level_gt3_flag[ n ] +abs_remainder[ n ] ) } for( n = firstPosMode1; n > firstPosMode2; n− − ){ xC = ( xS << log2SbSize ) + DiagScanOrder[ log2SbSize ][ log2SbSize ][n ][ 0 ] yC = ( yS << log2SbSize ) + DiagScanOrder[ log2SbSize ][log2SbSize ][ n ][ 1 ] if( abs_level_gt1_flag[ n ] ) abs_remainder[ n ]ae(v) AbsLevel[ xC ][ yC ] = AbsLevelPass1[ xC ][ yC ] + 2 *abs_remainder[ n ] } for( n = firstPosMode2; n >= 0; n− − ) { xC = ( xS<< log2SbSize ) + DiagScanOrder[ log2SbSize ][ log2SbSize ][ n ][ 0 ] yC= ( yS << log2SbSize ) + DiagScanOrder[ log2SbSize ][ log2SbSize ][ n ][1 ] dec_abs_level[ n ] ae(v) if(AbsLevel[ xC ][ yC ] > 0 )firstSigScanPosSb = n if( dep_quant_enabled_flag ) QState =QStateTransTable[ QState ][ AbsLevel[ xC ][ yC ] & 1 ] } if(dep_quant_enabled_flag | | !sign_data_hiding_enabled_flag ) signHidden =0 else signHidden = ( lastSigScanPosSb − firstSigScanPosSb > 3 ? 1 : 0 )for( n = numSbCoeff − 1; n >= 0; n−− ) { xC = ( xS << log2SbSize ) +DiagScanOrder[ log2SbSize ][ log2SbSize ][ n ][ 0 ] yC = ( yS <<log2SbSize ) + DiagScanOrder[ log2SbSize ][ log2SbSize ][ n ][ 1 ] if(sig_coeff_flag[ xC ][ yC ] && ( !signHidden | | ( n != firstSigScanPosSb) ) ) coeff_sign_flag[ n ] ae(v) } if( dep_quant_enabled_flag ) { QState= startQStateSb for( n = numSbCoeff − 1; n >= 0; n−− ) { xC = ( xS <<log2SbSize ) + DiagScanOrder[ log2SbSize ][ log2SbSize ][ n ][ 0 ] yC =( yS << log2SbSize ) + DiagScanOrder[ log2SbSize ][ log2SbSize ][ n ][ 1] if( sig_coeff_flag[ xC ][ yC ] ) TransCoeffLevel[ x0 ][ y0 ][ cIdx ][xC ][ yC ] = ( 2 * AbsLevel[ xC ][ yC ] − ( QState > 1 1 : 0 ) ) * ( 1 −2 * coeff_sign_flag[ n ] ) QState = QStateTransTable[ QState ][par_level_flag[ n ] ] } else { sumAbsLevel = 0 for( n = numSbCoeff − 1;n >= 0; n−− ) { xC = ( xS << log2SbSize ) + DiagScanOrder[ log2SbSize ][log2SbSize ][ n ][ 0 ] yC = ( yS << log2SbSize ) + DiagScanOrder[log2SbSize ][ log2SbSize ][ n ][ 1 ] if( sig_coeff_flag[ xC ][ yC ] ) {TransCoeffLevel[ x0 ][ y0 ][ cIdx ][ xC ][ yC ] = AbsLevel[ xC ][ yC ] *( 1 − 2 * coeff_sign_flag[ n ] ) if( signHidden ) { sumAbsLevel +=AbsLevel[ xC ][ yC ] if( ( n = = firstSigScanPosSb ) && ( sumAbsLevel %2 ) = = 1 ) ) TransCoeffLevel[ x0 ][ y0 ][ cIdx ][ xC ][ yC ] =−TransCoeffLevel[ x0 ][ y0 ][ cIdx ][ xC ][ yC ] } } } } } if(tu_mts_flag[ x0 ][ y0 ] && ( cIdx = = 0 ) ) mts_idx[ x0 ][ y0 ][ cIdx ]ae(v) }

last_sig_coeff x_prefix specifies the prefix of the column position ofthe last significant coefficient in scanning order within a transformblock. The values of last_sig_coeff_x_prefix shall be in the range of 0to (Min(log 2TbWidth, 5)<<1)−1, inclusive.

last_sig_coeff y_prefix specifies the prefix of the row position of thelast significant coefficient in scanning order within a transform block.The values of last_sig_coeff_y_prefix shall be in the range of 0 to(Min(log 2TbHeight, 5)<<1)−1, inclusive.

Table 13 below shows syntax elements and associated binarizations.

TABLE 13 Syntax Binarization structure Syntax element Process Inputparameters tile_group_data( ) end_of_tile_group_flag FL cMax = 1coding_tree_unit( ) alf_ctb_flag[ ][ ][ ] FL cMax = 1 sao( )sao_merge_left_flag FL cMax = 1 sao_merge_up_flag FL cMax = 1sao_type_idx_luma TR cMax = 2, cRiceParam = 0 sao_type_idx_chroma TRcMax = 2, cRiceParam = 0 sao_offset_abs[ ][ ][ ][ ] TR cMax = (1 <<(Min(bitDepth, 10) − 5)) − 1, cRiceParam = 0 sao_offset_sign[ ][ ][ ][ ]FL cMax = 1 sao_band_position[ ][ ][ ] FL cMax = 31 sao_eo_class_luma FLcMax = 3 sao_eo_class_chroma FL cMax = 3 coding_quadtree( )qt_split_cu_flag[ ][ ] FL cMax = 1 multi_type_tree( ) mtt_split_cu_flagFL cMax = 1 mtt_split_cu_vertical_flag FL cMax = 1mtt_split_cu_binary_flag FL cMax = 1 coding_unit() cu_skip_flag[ ][ ] FLcMax = 1 pred_mode_flag FL cMax = 1 pcm_flag[ ][ ] FL cMax = 1intra_luma_ref_idx[ ][ ] TR cMax = 2, cRiceParam = 0intra_luma_mpm_flag[ ][ ] FL cMax = 1 intra_luma_mpm_idx[ ][ ] TR cMax =5, cRiceParam = 0 intra_luma_mpm_remainder[ ] TB cMax = 60 [ ]intra_chroma_pred_mode[ ][ ] 9.5.3.7 — merge_flag[ ][ ] FL cMax = 1inter_pred_idc[ x0 ][ y0 ] 9.5.3.8 cbWidth, cbHeight inter_affine_flag[][ ] FL cMax = 1 cu_affine_type_flag[ ][ ] FL cMax = 1 ref_idx_l0[ ][ ]TR cMax = num_ref_idx_l0_active_minus1, cRiceParam = 0 mvp_l0_flag[ ][ ]FL cMax = 1 ref_idx_l1[ ][ ] TR cMax = num_ref_idx_l1_active_minus1,cRiceParam = 0 mvp_l1_flag[ ][ ] FL cMax = 1 avmr_flag[ ][ ] FL cMax = 1amvr_4pel_flag[ ][ ] FL cMax = 1 gbi_idx[ ][ ] TR cMax =NoBackwardPredFlag ? 4: 2 cu_cbf FL cMax = 1 merge_data( ) mmvd_flag[ ][] FL cMax = 1 mmvd_merge_flag[ ][ ] FL cMax = 1 mmvd_distance_idx[ ][ ]TR cMax = 7, cRiceParam = 0 mmvd_direction_idx[ ][ ] FL cMax = 3ciip_flag[ ][ ] FL cMax = 1 ciip_luma_mpm_flag[ ][ ] FL cMax = 1ciip_luma_mpm_idx[ ][ ] TR cMax = 2, cRiceParam = 0 merge_subblock_flag[][ ] FL cMax = 1 merge_subblock_idx[ ][ ] TR cMax =MaxNumSubblockMergeCand − 1, cRiceParam = 0 merge_triangle_flag[ ][ ] FLcMax = 1 merge_triangle_idx[ ][ ] EG1 — merge_idx[ ][ ] TR cMax =MaxNumMergeCand − 1, cRiceParam = 0 mvd_coding( ) abs_mvd_greater0_flag[] FL cMax = 1 abs_mvd_greater1_flag[ ] FL cMax = 1 abs_mvd_minus2[ ] EG1— mvd_sign_flag[ ] FL cMax = 1 transform_unit tu_cbf_luma[ ][ ][ ] FLcMax = 1 ( ) tu_cbf_cb[ ][ ][ ] FL cMax = 1 tu_cbf_cr[ ][ ][ ] FL cMax =1 cu_qp_delta_abs 9.5.3.9 — cu_qp_delta_sign_flag FL cMax = 1tu_mts_flag[ ][ ] FL cMax = 1 residual_coding( ) transform_skip_flag[ ][][ ] FL cMax = 1 last_sig_coeff_x_prefix TR cMax = (Min(log2TbWidth, 5)<< 1) − 1, cRiceParam = 0 last_sig_coeff_y_prefix TR cMax =(Min(log2TbHeight, 5) << 1) − 1, cRiceParam = 0 last_sig_coeff_x_suffixFL cMax = (1 << ((last_sig_coeff_x_prefix >> 1) − 1) − 1)last_sig_coeff_y_suffix FL cMax = (1 << ((last_sig_coeff_y_prefix >> 1)− 1) − 1) coded_sub_block_flag[ ][ ] FL cMax = 1 sig_coeff_flag[ ][ ] FLcMax = 1 par_level_flag[ ] FL cMax = 1 abs_level_gt1_flag[ ] FL cMax = 1abs_level_gt3_flag[ ] FL cMax = 1 abs_remainder[ ] 9.5.3.10 cIdx,current sub-block index i, x0, y0 dec_abs_level[ ] 9.5.3.11 cIdx, x0,y0, xC, yC, log2TbWidth, log2TbHeight coeff_sign_flag[ ] FL cMax = 1mts_idx[ ][ ][ ] FL cMax = 3

In the above-described example, the methods are explained on the basisof a flowchart by means of a series of steps or blocks, but the presentdisclosure is not limited to the order of steps, and a certain step mayoccur in a different order or concurrently with other steps than thosedescribed above. Further, it may be understood by a person havingordinary skill in the art that the steps shown in a flowchart is notexclusive, and that another step may be incorporated or one or moresteps of the flowchart may be removed without affecting the scope of thepresent disclosure.

The foregoing methods according to the disclosure may be implemented asa software form, and the encoding apparatus and/or decoding apparatusaccording to the disclosure may be included in an apparatus forperforming image processing of, for example, a TV, a computer, asmartphone, a set-top box, and a display device.

In the disclosure, when examples are embodied by a software, theforgoing methods may be embodied with modules (process, function or thelike) of performing above-described functions. The modules may be storedin a memory and may be executed by a processor. The memory may be insideor outside the processor and may be connected to the processor via awell-known various means. The processor may include anapplication-specific integrated circuit (ASIC), a different chipset, alogic circuit, and/or a data processor. The memory may include aread-only memory (ROM), a random access memory (RAM), a flash memory, amemory card, a storage medium, and/or another storage device. That is,examples described in the present disclosure may be embodied andperformed on a processor, a microprocessor, a controller or a chip. Forexample, function units shown in each drawing may be embodied andperformed on a processor, a microprocessor, a controller or a chip. Inthis case, information or algorithm for embodying (e.g., information oninstruction) may be stored in a digital storage medium.

Further, the decoding apparatus and the encoding apparatus to which thepresent disclosure is applied may be included in a multimediabroadcasting transceiver, a mobile communication terminal, a home cinemavideo device, a digital cinema video device, a surveillance camera, avideo chat device, a real time communication device such as videocommunication, a mobile streaming device, a storage medium, a camcorder,a video on demand (VoD) service providing device, an over the top (OTT)video device, an internet streaming service providing device, athree-dimensional (3D) video device, a virtual reality device, anaugmented reality (argumente reality) device, a video telephony videodevice, a transportation means terminal (e.g., a vehicle (including anautonomous vehicle) terminal, an aircraft terminal, a ship terminal,etc.) and a medical video device, and may be used to process a videosignal or a data signal. For example, the over the top (OTT) videodevice may include a game console, a Blu-ray player, an Internet accessTV, a Home theater system, a smartphone, a Tablet PC, a digital videorecorder (DVR) and the like.

In addition, the processing method to which the present disclosure isapplied may be produced in the form of a program executed by a computer,and be stored in a computer-readable recording medium. Multimedia datahaving a data structure according to the present disclosure may be alsostored in a computer-readable recording medium. The computer-readablerecording medium includes all kinds of storage devices and distributionstorage devices in which computer-readable data are stored. Thecomputer-readable recording medium may include, for example, a Blu-rayDisc (BD), a Universal Serial Bus (USB), a ROM, a PROM, an EPROM, anEEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk and an opticaldata storage device. Further, the computer-readable recording mediumalso includes media embodied in the form of a carrier wave (for example,transmission over the Internet). In addition, a bitstream generated bythe encoding method may be stored in a computer-readable recordingmedium or transmitted through a wired or wireless communication network.

Additionally, the examples of the present disclosure may be embodied asa computer program product by program codes, and the program codes maybe performed in a computer by the examples of the present disclosure.The program codes may be stored on a computer-readable carrier. othersteps than those described above. Further, it may be understood by aperson having ordinary skill in the art that the steps shown in aflowchart is not exclusive, and that

FIG. 11 represents an example of a contents streaming system to whichthe disclosure of the present document may be applied.

Refering to FIG. 11, the content streaming system to which theembodiment(s) of the present document is applied may largely include anencoding server, a streaming server, a web server, a media storage, auser device, and a multimedia input device.

The encoding server compresses content input from multimedia inputdevices such as a smartphone, a camera, a camcorder, etc. into digitaldata to generate a bitstream and transmit the bitstream to the streamingserver. As another example, when the multimedia input devices such assmartphones, cameras, camcorders, etc. directly generate a bitstream,the encoding server may be omitted.

The bitstream may be generated by an encoding method or a bitstreamgenerating method to which the embodiment(s) of the present document isapplied, and the streaming server may temporarily store the bitstream inthe process of transmitting or receiving the bitstream.

The streaming server transmits the multimedia data to the user devicebased on a user's request through the web server, and the web serverserves as a medium for informing the user of a service. When the userrequests a desired service from the web server, the web server deliversit to a streaming server, and the streaming server transmits multimediadata to the user. In this case, the content streaming system may includea separate control server. In this case, the control server serves tocontrol a command/response between devices in the content streamingsystem.

The streaming server may receive content from a media storage and/or anencoding server. For example, when the content is received from theencoding server, the content may be received in real time. In this case,in order to provide a smooth streaming service, the streaming server maystore the bitstream for a predetermined time.

Examples of the user device may include a mobile phone, a smartphone, alaptop computer, a digital broadcasting terminal, a personal digitalassistant (PDA), a portable multimedia player (PMP), navigation, a slatePC, tablet PCs, ultrabooks, wearable devices (ex. smartwatches, smartglasses, head mounted displays), digital TVs, desktops computer, digitalsignage, and the like. Each server in the content streaming system maybe operated as a distributed server, in which case data received fromeach server may be distributed.

Each of servers in the contents streaming system may be operated as adistributed server, and in this case, data received by each server maybe distributedly processed.

What is claimed is:
 1. An image decoding method, by a decodingapparatus, comprising: deriving transform coefficients for the currentblock based on residual information received from a bistream; derivingresidual samples for the current block based on the derived transformcoefficients; and generating a reconstructed picture based on theresidual samples for the current block, wherein the current blockincludes a low frequency transform coefficient region including at leastone significant transform coefficient and a region except the lowfrequency transform coefficient region including transform coefficient0, the residual information includes last significant coefficient prefixinformation on position of last non-zero transform coefficient among thetransform coefficients for the current block, the position of the lastnon-zero transform coefficient is determined based on a prefix codewordrelated to the last significant coefficient prefix information, and amaximum value of the last significant coefficient prefix information isdetermined based on a size of the low frequency transform coefficientregion.
 2. The image decoding method of claim 1, wherein the size of thelow frequency transform coefficient region is determined based on awidth and height of the low frequency transform coefficient region, andthe last significant coefficient prefix information includes x-axisprefix information and y-axis prefix information, and the prefixcodeword is a codeword for the x-axis prefix information or a codewordfor the y-axis prefix information.
 3. The image decoding method of claim2, wherein a maximum length of the prefix codeword which indicates thex-axis prefix information and a maximum length of the codeword, whichindicates the y-axis prefix information are determined based on themaximum value of the last significant coefficient prefix information,wherein the prefix codeword is derived based on the truncated unarybinarization.
 4. The image decoding method of claim 3, wherein themaximum length of the codeword is determined to be 9 based on the widthof the low frequency transform coefficient region being 32, and themaximum length of the codeword is determined to be 9 based on the heightof the low frequency transform coefficient region being
 32. 5. The imagedecoding method of claim 3, wherein a maximum binarized value of thecodeword for the x-axis prefix information is determined to be 111111111based on a width of the current block being greater than 32, and thatthe width of the low frequency transform coefficient region is 32, and amaximum binarized value of the codeword for the y-axis prefixinformation is determined to be 111111111 based on a height of thecurrent block being greater than 32, and that the height of the lowfrequency transform coefficient region is
 32. 6. The image decodingmethod of claim 3, wherein a maximum length of the codeword for thex-axis prefix information is determined based on cMax_(x), whereincMax_(x) being calculated based on the following equation:c Max_(x)=(log₂(Min(W ₁ ,W ₂))<<1)−1 where cMax_(x) is equal to themaximum length of the codeword for the x-axis prefix information; the W₁is a width of the current block; and the W₂ is a width of the lowfrequency transform coefficient region.
 7. The image decoding method ofclaim 6, wherein a width of the low frequency transform coefficientregion is 32, and a maximum length of the codeword for the x-axis prefixinformation is determined based on cMax_(x), wherein cMax_(x) beingcalculated based on the following equation:c Max_(x)=(Min(log₂ W ₁,5))<<1)−1 where cMax_(x) is equal to the maximumlength of the codeword for the x-axis prefix information, and the W₁ isa width of the current block.
 8. The image decoding method of claim 3,wherein a maximum length of the codeword for the y-axis prefixinformation is determined based on cMax_(y), wherein cMax_(y) beingcalculated based on the following equation:c Max_(y)=(log₂(Min(H ₁ ,H ₂))<<1)−1 where cMax_(y) is equal to themaximum length of the codeword for the y-axis prefix information; the H₁is a height of the current block; and the H₂ is a height of the lowfrequency transform coefficient region.
 9. The image decoding method ofclaim 8, wherein the height of the low frequency transform coefficientis 32, and the maximum length of the codeword for the y-axis prefixinformation is determined based on cMax_(y), wherein cMax_(x) beingcalculated based on the following equation:c Max_(y)=(Min(log₂ H ₁,5))<<1)−1 where cMax_(y) is equal to the maximumlength of the codeword for the y-axis prefix information, and the H₁ isa height of the current block.
 10. The image decoding method of claim 1,wherein the current block is a square block or a non-square block, awidth of the low frequency transform coefficient region is determined tobe 32 based on a width of the current block being 64, and a height ofthe low frequency transform coefficient region is determined to be 32based on a height of the current block being
 64. 11. The image decodingmethod of claim 1, wherein the size of the low frequency transformcoefficient region is determined based on a size of the current block.12. The image decoding method of claim 1, wherein the residualinformation includes information on the size of the low frequencytransform coefficient region.
 13. The image decoding method of claim 1,wherein a size of the current block is 64×64, the size of the lowfrequency transform coefficient region is 32×32, and a maximum length ofthe prefix codeword is
 9. 14. An image encoding method, by an encodingapparatus, comprising: deriving residual samples for a current block;deriving transform coefficients for the current block based on theresidual samples for the current block; and encoding residualinformation related with the transform coefficients, wherein the currentblock includes a low frequency transform coefficient region including atleast one significant transform coefficient and a region except the lowfrequency transform coefficient region including transform coefficient0, the residual information includes last significant coefficient prefixinformation on position of a last non-zero transform coefficient amongthe transform coefficients for the current block, the position of thelast non-zero transform coefficient is based on a prefix codewordrelated to the last significant coefficient prefix information, and amaximum value of the last significant coefficient prefix information isdetermined based on a size of the low frequency transform coefficientregion.
 15. A non-transitory computer readable storage medium storing abistream causing a decoding apparatus to perform an image decodingmethod, the method comprising; deriving transform coefficients for thecurrent block based on residual information received from a bistream;deriving residual samples for the current block based on the derivedtransform coefficients; and generating a reconstructed picture based onthe residual samples for the current block, wherein the current blockincludes a low frequency transform coefficient region including at leastone significant transform coefficient and a region except the lowfrequency transform coefficient region including transform coefficient0, the residual information includes last significant coefficient prefixinformation on position of last non-zero transform coefficient among thetransform coefficients for the current block, the position of the lastnon-zero transform coefficient is determined based on a prefix codewordrelated to the last significant coefficient prefix information, and amaximum value of the last significant coefficient prefix information isdetermined based on a size of the low frequency transform coefficientregion.